reed
f9ad558943
Revert of Revert of Return GrGLContext from GrTestTarget (patchset #1 id:1 of https://codereview.chromium.org/1211123004/ )
...
Reason for revert:
un-referting, did not help DEPS roll
Original issue's description:
> Revert of Return GrGLContext from GrTestTarget (patchset #3 id:40001 of https://codereview.chromium.org/1207393002/ )
>
> Reason for revert:
> speculative revert to unblock DEPS roll (layout-tests)
>
> Original issue's description:
> > Return GrGLContext from GrTestTarget
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/b6d93ea428ca5d13641c35faca7d0380980a3a17
>
> TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1852ec2b46a2a0efbb3550ff4d8b640f56a810e9
TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1215593002
2015-06-25 21:29:25 -07:00
reed
1852ec2b46
Revert of Return GrGLContext from GrTestTarget (patchset #3 id:40001 of https://codereview.chromium.org/1207393002/ )
...
Reason for revert:
speculative revert to unblock DEPS roll (layout-tests)
Original issue's description:
> Return GrGLContext from GrTestTarget
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b6d93ea428ca5d13641c35faca7d0380980a3a17
TBR=bsalomon@google.com ,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1211123004
2015-06-25 18:59:32 -07:00
joshualitt
b6d93ea428
Return GrGLContext from GrTestTarget
...
BUG=skia:
Review URL: https://codereview.chromium.org/1207393002
2015-06-25 15:02:22 -07:00
bsalomon
6dc6f5f4a1
Add support for creating texture backed images where Skia will delete the texture.
...
Review URL: https://codereview.chromium.org/1187523005
2015-06-18 09:12:17 -07:00
vbuzinov
dded69693d
Implement support for mixed sampled render targets
...
Adds a new FBO type kStencil_MSFBOType that is selected whenever
NV_framebuffer_mixed_samples extension is available. In this new
FBO type a non-msaa color buffer is created with a multisampled
stencil buffer attachment.
Replaces numSamples() with separate numColorSamples and numStencilSamples
methods in RenderTarget.
In mixed samples mode non-MSAA codepaths are used to draw simple shapes,
while NVPR-rendered paths and text are rendered with a multisampled
stencil.
BUG=skia:3177
Review URL: https://codereview.chromium.org/1001503002
2015-06-12 08:59:45 -07:00
bsalomon
7622863095
Add direct getter for GrCaps to GrContext.
...
TBR=joshualitt@google.com
Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99
Review URL: https://codereview.chromium.org/1149773005
2015-05-29 08:02:10 -07:00
bsalomon
084d1b61bc
Revert of Add direct getter for GrCaps to GrContext. (patchset #4 id:60001 of https://codereview.chromium.org/1149773005/ )
...
Reason for revert:
Breaking
Original issue's description:
> Add direct getter for GrCaps to GrContext.
>
> TBR=joshualitt@google.com
>
> Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99
TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1164443002
2015-05-28 08:20:58 -07:00
bsalomon
9138c46e57
Add direct getter for GrCaps to GrContext.
...
TBR=joshualitt@google.com
Review URL: https://codereview.chromium.org/1149773005
2015-05-28 08:13:16 -07:00
bsalomon
d309e7aa0e
This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.
...
Review URL: https://codereview.chromium.org/1107973004
2015-04-30 14:18:54 -07:00
egdaniel
8dc7c3a839
Rename GrStencilBuffer to GrStencilAttachment
...
BUG=skia:
Review URL: https://codereview.chromium.org/1083133002
2015-04-16 11:22:42 -07:00
bsalomon
3f324321cd
Add mechanism to proactively purge old resources in GrResourceCache.
...
This change leaves the feature turned off by default.
Review URL: https://codereview.chromium.org/1032873002
2015-04-08 11:01:55 -07:00
mtklein
36352bf5e3
C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
...
NOPRESUBMIT=true
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002
Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
bsalomon
6bc1b5fab8
Dynamically create stencil buffer when needed.
...
Review URL: https://codereview.chromium.org/938383004
2015-02-23 09:06:38 -08:00
bsalomon
b602d4dff8
Speculative fix for nexus player unit test failure
...
TBR=robertphillips@google.com
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/941433006
2015-02-19 12:05:58 -08:00
bsalomon
ddf30e64fe
Handle the case when the GrResourceCache timestamp wraps.
...
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/916103006
2015-02-19 11:38:45 -08:00
bsalomon
02a44a4886
Recycle stencil buffers across render targets.
...
Review URL: https://codereview.chromium.org/939093002
2015-02-19 09:09:00 -08:00
bsalomon
f99e961f55
Allow resources' unique keys to be changed.
...
Review URL: https://codereview.chromium.org/938943002
2015-02-19 08:24:16 -08:00
bsalomon
8718aafec2
Rename GrContentKey to GrUniqueKey
...
Review URL: https://codereview.chromium.org/940463006
2015-02-19 07:24:21 -08:00
bsalomon
3582d3ee9f
Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.
...
Review URL: https://codereview.chromium.org/923143002
2015-02-13 14:20:05 -08:00
bsalomon
0ea80f43a1
Rename GrResourceCache2->GrResourceCache
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/921453002
2015-02-11 10:49:59 -08:00
bsalomon
23e619cf46
Reimplement gpu message bus for invalidated bitmap gen IDs
...
Review URL: https://codereview.chromium.org/902873002
2015-02-06 11:54:28 -08:00
bsalomon
63c992f6c0
Fix the speeling of "purgeable" in Gr code
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/874693002
2015-01-23 12:47:59 -08:00
bsalomon
c2f35b750a
Allow unbudgeted resources to be recycled by the cache as scratch.
...
Review URL: https://codereview.chromium.org/870743002
2015-01-23 07:19:22 -08:00
bsalomon
24db3b1c35
Add specialized content key class for resources.
...
Review URL: https://codereview.chromium.org/858123002
2015-01-23 04:24:05 -08:00
bsalomon
1c60dfe7ca
Reland https://codereview.chromium.org/860333002 with fix for test failures.
...
Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )"
This reverts commit 988018c817
.
BUG=skia:
Review URL: https://codereview.chromium.org/863983003
2015-01-21 09:32:40 -08:00
mtklein
988018c817
Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )
...
Reason for revert:
Our Valgrind bot just spewed out a weird error. I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily. Sorry if this is a false positive.
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio
Original issue's description:
> Make GrScratchKey memory buffer correct size on copy
>
> Scratch key memory buffer of a copy of a key was too big. The (new) copy
> was N times uint32_t bytes instead of N bytes.
>
> Adds few tests to resource cache. These tests would not catch the too
> big buffer. This is just a precaution for too small buffers. The main
> idea of the test change is that the scratch key should contain some
> information, so that lookup with a scratch key can also return no
> match. Otherwise testing of scratch lookup result is not indicative of
> correct code (eg. no-information scratch key will always match).
>
> Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2
TBR=bsalomon@google.com ,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864833003
2015-01-21 08:05:55 -08:00
kkinnunen
711ef48313
Make GrScratchKey memory buffer correct size on copy
...
Scratch key memory buffer of a copy of a key was too big. The (new) copy
was N times uint32_t bytes instead of N bytes.
Adds few tests to resource cache. These tests would not catch the too
big buffer. This is just a precaution for too small buffers. The main
idea of the test change is that the scratch key should contain some
information, so that lookup with a scratch key can also return no
match. Otherwise testing of scratch lookup result is not indicative of
correct code (eg. no-information scratch key will always match).
Review URL: https://codereview.chromium.org/860333002
2015-01-21 06:39:14 -08:00
bsalomon
afe3005be3
Require budget decision when creating a RenderTarget SkSurface.
...
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004
2015-01-16 07:32:33 -08:00
bsalomon
5236cf480d
Make uncached textures uncached from the get go.
...
This avoids the problem of a newly created uncached texture causing a purge of cached resources.
BUG=chromium:445885
Review URL: https://codereview.chromium.org/846303002
2015-01-14 10:42:08 -08:00
bsalomon
7775c85611
Add a simpler key type for scratch resource keys.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/815833004
2014-12-30 12:50:52 -08:00
bsalomon
10e23caea3
Use scratch keys for stencil buffers.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/91175f19664a62851da4ca4e0984a7c7c45b258f
Review URL: https://codereview.chromium.org/747043004
2014-11-25 05:52:06 -08:00
bsalomon
19cd0f1813
Revert "Use scratch keys for stencil buffers."
...
This reverts commit 91175f1966
.
Revert "Cleanup res cache bench and split out into a unit test."
This reverts commit 4e4303f002
.
Revert "rebaselines"
This reverts commit 65ba7b5775
.
TBR=tomhudson@google.com
Review URL: https://codereview.chromium.org/752233002
2014-11-24 12:19:06 -08:00
bsalomon
4e4303f002
Cleanup res cache bench and split out into a unit test.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/754833002
2014-11-24 08:25:05 -08:00
bsalomon
84c8e62fad
Allow GPU resources to not be counted against the cache budget.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/721353002
2014-11-17 09:33:27 -08:00
bsalomon
dace19ec17
Correct accounting for wrapped resources
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/720033004
2014-11-17 07:34:06 -08:00
bsalomon
12299ab7a1
Make GrResourceCache2 responsible for calling release, abandon, and ~.
...
BUG=skia:2889
TBR=robertphillips@google.com
NOTRY=true
Review URL: https://codereview.chromium.org/729683002
2014-11-14 13:33:09 -08:00
bsalomon
71cb0c241e
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89
Review URL: https://codereview.chromium.org/716143004
2014-11-14 12:10:15 -08:00
bsalomon
ac49acda52
Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/ )
...
Reason for revert:
broken again
Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/726913002
2014-11-14 06:47:39 -08:00
bsalomon
407aa584d1
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
Review URL: https://codereview.chromium.org/716143004
2014-11-14 06:29:40 -08:00
bsalomon
f21dab9540
Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 id:100001 of https://codereview.chromium.org/716143004/ )
...
Reason for revert:
Breaking stuff
Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/715333003
2014-11-13 13:33:28 -08:00
bsalomon
66a450f21a
Replace GrResourceCache with GrResourceCache2.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/716143004
2014-11-13 13:19:10 -08:00
bsalomon
69ed47f42d
Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/702413003
2014-11-12 11:13:39 -08:00
bsalomon
48ea202817
set key data in duplicate scratch key unit test
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/722763002
2014-11-12 10:28:17 -08:00
bsalomon
453cf40ac7
Add GrGpuResource::CacheAccess
...
Internal only helper class for manipulating and accessing cache keys.
BUG=skia:2889
Review URL: https://codereview.chromium.org/703303003
2014-11-11 14:15:57 -08:00
bsalomon
6d4488c5e0
Remove all knowledge of resource keys from the legacy cache.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/705413002
2014-11-11 07:27:16 -08:00
bsalomon
8b79d23f82
Use GrResourceCache2 to service content key lookups
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/707493002
2014-11-10 10:19:06 -08:00
bsalomon
3343557421
Add mock context and use in ResourceCacheTest.
...
BUG=skia:2889
Committed: https://skia.googlesource.com/skia/+/820dd6c335411aad889c1d7e8a857642ecd87e30
Review URL: https://codereview.chromium.org/702083003
2014-11-05 14:47:42 -08:00
bsalomon
fdcf2c0863
Revert of Add mock context and use in ResourceCacheTest. (patchset #4 id:60001 of https://codereview.chromium.org/702083003/ )
...
Reason for revert:
Breaking tests
Original issue's description:
> Add mock context and use in ResourceCacheTest.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/820dd6c335411aad889c1d7e8a857642ecd87e30
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/704563004
2014-11-05 12:30:32 -08:00
bsalomon
820dd6c335
Add mock context and use in ResourceCacheTest.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/702083003
2014-11-05 12:09:45 -08:00
bsalomon
f2703d83da
rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
...
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00