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
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
mtklein
72c9faab45
Fix up all the easy virtual ... SK_OVERRIDE cases.
...
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.
for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end
BUG=skia:
Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -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
37dd331b20
Add class GrGLTextureRenderTarget for GL texture/rendertarget objects
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/695813003
2014-11-03 08:47:23 -08:00
bsalomon
f2703d83da
rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
...
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00
bsalomon
a0036c6e33
Delete unused method aliases and texture flag.
...
Committed: https://skia.googlesource.com/skia/+/7fdffe41494cbd78a8ee2a6ef0509e46ec77039f
Review URL: https://codereview.chromium.org/672753002
2014-10-24 12:46:57 -07:00
bsalomon
26979c8260
Revert of Delete unused method aliases and texture flag. (patchset #1 id:1 of https://codereview.chromium.org/672753002/ )
...
Reason for revert:
Need to remove one more reference to this in blink before relanding.
Original issue's description:
> Delete unused method aliases and texture flag.
>
> Committed: https://skia.googlesource.com/skia/+/7fdffe41494cbd78a8ee2a6ef0509e46ec77039f
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/671203002
2014-10-23 07:41:29 -07:00
bsalomon
7fdffe4149
Delete unused method aliases and texture flag.
...
Review URL: https://codereview.chromium.org/672753002
2014-10-23 06:56:55 -07:00
bsalomon
81beccc4fb
Devirtualize read/write pixels on surface.
...
Consolidate read/write funcs in context.
Remove support for reading pixels from a surface that's not a target. It's currently broken and neither used nor tested.
Review URL: https://codereview.chromium.org/648863002
2014-10-13 12:32:55 -07:00
bsalomon
bcf0a52d4f
GrResourceCache2 manages scratch texture.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/608883003
2014-10-08 08:40:09 -07:00
Brian Salomon
9323b8b8e1
Revert "GrResourceCache2 manages scratch texture."
...
This reverts commit d14e1a2764
.
2014-10-07 15:07:38 -04:00
bsalomon
d14e1a2764
GrResourceCache2 manages scratch texture.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/608883003
2014-10-07 07:27:07 -07:00
bsalomon
afbf2d6273
Make "priv" classes for GrTexure and GrSurface.
...
R=robertphillips@google.com , egdaniel@google.com , joshualitt@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/596053002
2014-09-30 12:18:44 -07:00
robertphillips
b06e5a2f55
Revert of Make "priv" classes for GrTexure and GrSurface. (patchset #9 id:260001 of https://codereview.chromium.org/596053002/ )
...
Reason for revert:
Breaking the Chrome builds with:
lib/libcc.so: error: undefined reference to 'GrAutoScratchTexture::detach()'
(http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2990/steps/Retry_BuildContentShell_1/logs/stdio )
Original issue's description:
> Make "priv" classes for GrTexure and GrSurface.
R=egdaniel@google.com , joshualitt@google.com , bsalomon@google.com
TBR=bsalomon@google.com , egdaniel@google.com , joshualitt@google.com
NOTREECHECKS=true
NOTRY=true
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/618733002
2014-09-30 06:58:20 -07:00
robertphillips
dbe6074a06
Revert of GrResourceCache2 manages scratch texture. (patchset #14 id:260001 of https://codereview.chromium.org/608883003/ )
...
Reason for revert:
Turning bots red:
Nanobench seems to be uniformly failing on Android
(http://108.170.220.21:10117/builders/Perf-Android-Venue8-PowerVR-x86-Release/builds/99/steps/RunNanobench/logs/stdio )
Ubuntu GTX660 32bit is failing in both Debug and Release on GM generation (it appears to be out of memory) (http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/builds/2457/steps/GenerateGMs/logs/stdio )
Original issue's description:
> GrResourceCache2 manages scratch texture.
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3d398c876440deaab39bbf2a9b881c337e6dc8d4
R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/611383003
2014-09-30 06:54:17 -07:00
bsalomon
3d398c8764
GrResourceCache2 manages scratch texture.
...
BUG=skia:
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/608883003
2014-09-30 06:02:23 -07:00
bsalomon
c0eb9b9818
Make "priv" classes for GrTexure and GrSurface.
...
R=robertphillips@google.com , egdaniel@google.com , joshualitt@google.com , joshualitt@chromium.org
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/596053002
2014-09-29 14:20:11 -07:00
bsalomon
744998e666
Make textures register with GrResourceCache2 as scratch.
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/510053003
2014-08-28 09:54:34 -07:00
bsalomon
944bcf0acb
Some fixes around GrContext::abandonContext:
...
Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list.
Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned.
Stop leaking program cache entries when context is abandoned.
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/422323002
2014-07-29 08:01:52 -07:00
bsalomon
c44be0e9e4
Merge GrGpuObject and GrCacheable.
...
We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/414013005
2014-07-25 07:32:33 -07:00
bsalomon
dcabb05113
Make GrCacheable implement its own ref counting.
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/392333008
2014-07-21 14:24:01 -07:00
tfarina
f9dae780c2
Remove GrIsPow2 in favor of SkIsPow2.
...
Looks like there is no good reason to have two copies of this function
doing the same thing with different name.
BUG=None
TEST=make tests
R=bsalomon@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/318873002
2014-06-06 06:35:28 -07:00
commit-bot@chromium.org
e49157f083
Factor GrTexture into public GrTexture and private GrTextureImpl.
...
Committed: http://code.google.com/p/skia/source/detail?r=14680
R=jvanverth@google.com , robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/275903002
git-svn-id: http://skia.googlecode.com/svn/trunk@14687 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 20:46:48 +00:00
commit-bot@chromium.org
59e7d23852
Revert of Factor GrTexture into public GrTexture and private GrTextureImpl. ( https://codereview.chromium.org/275903002/ )
...
Reason for revert:
Breaks chrome build.
Original issue's description:
> Factor GrTexture into public GrTexture and private GrTextureImpl.
>
> Committed: http://code.google.com/p/skia/source/detail?r=14680
R=jvanverth@google.com , robertphillips@google.com
TBR=jvanverth@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/278073002
git-svn-id: http://skia.googlecode.com/svn/trunk@14681 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 18:02:51 +00:00
commit-bot@chromium.org
bd465d141b
Factor GrTexture into public GrTexture and private GrTextureImpl.
...
R=jvanverth@google.com , robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/275903002
git-svn-id: http://skia.googlecode.com/svn/trunk@14680 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 17:37:55 +00:00
commit-bot@chromium.org
11c6b39cfa
Adds a mechanism for GrCacheable objects to notify the resource cache
...
when their size has changed. GrResourceCacheEntry now holds a
reference to the cache, and a cached value of the resource's most
recent size.
Also utilizes this new functionality for mipmaps, and adds a test for
changing resource sizes.
R=bsalomon@google.com , robertphillips@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/257093002
git-svn-id: http://skia.googlecode.com/svn/trunk@14576 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-05 19:09:13 +00:00
commit-bot@chromium.org
089a780c33
Split GrResource into GrCacheable/GrGpuObject
...
Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.
This change splits GrResource into two classes:
1. GrCacheable: The base class for objects that can live in the
GrResourceCache.
2. GrGpuObject, which inherits from GrCacheable: The base class for
objects that get tracked by GrGpu.
This change is purely a refactor; there is no change in functionality.
Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e
BUG=skia:
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/251013002
git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 21:38:22 +00:00
commit-bot@chromium.org
972f9cd7a0
SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h
...
BUG=skia:
R=bsalomon@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/216503004
git-svn-id: http://skia.googlecode.com/svn/trunk@13982 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-28 17:58:28 +00:00
robertphillips@google.com
0308707248
Make it explicit that some validate methods are debug only
...
https://codereview.chromium.org/25716003/
git-svn-id: http://skia.googlecode.com/svn/trunk@11575 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 16:42:21 +00:00
commit-bot@chromium.org
515dcd3603
Replace uses of GR_DEBUG by SK_DEBUG.
...
BUG=None
R=bsalomon@google.com , robertphillips@google.com
Author: tfarina@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23137022
git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-28 14:17:03 +00:00
tfarina@chromium.org
f6de475e5c
Replace uses of GrAssert by SkASSERT.
...
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/22850006
git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-17 00:02:59 +00:00
skia.committer@gmail.com
aeefb2afe7
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@10398 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-27 07:01:06 +00:00
commit-bot@chromium.org
cffff79a40
get genmipmap function in the struct
...
BUG=
R=bsalomon@google.com , reed@google.com
Author: humper@google.com
Review URL: https://chromiumcodereview.appspot.com/20436002
git-svn-id: http://skia.googlecode.com/svn/trunk@10393 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-26 16:36:04 +00:00
humper@google.com
b86add1ad3
make the filter mode for GrTextureAccess an enum so we can plumb down
...
the paint's filter modes to the GPU
BUG=
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/20362002
git-svn-id: http://skia.googlecode.com/svn/trunk@10368 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 18:49:07 +00:00
bsalomon@google.com
686bcb871b
Reland of 8525 with fix for case when GrRT outlives GrTexture.
...
Review URL: https://codereview.chromium.org/13814015
git-svn-id: http://skia.googlecode.com/svn/trunk@8573 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 15:04:12 +00:00
bsalomon@google.com
e06f8ef5ba
Revert 8525,8526 pending investigation of bench_pictures crashes.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@8527 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 21:06:42 +00:00
bsalomon@google.com
d02e8803e9
Remove GrTexture::releaseRenderTarget() and add GrSurface::isSameAs().
...
Review URL: https://codereview.chromium.org/13414006
git-svn-id: http://skia.googlecode.com/svn/trunk@8525 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 19:49:13 +00:00
bsalomon@google.com
26e18b593a
Add support for reading the dst pixel value in an effect. Use in a new effect for the kDarken xfer mode.
...
The current implementation is to always make a copy of the entire dst before the draw.
It will only succeed if the RT is also a texture.
Obviously, there is lots of room for improvement.
Review URL: https://codereview.chromium.org/13314002
git-svn-id: http://skia.googlecode.com/svn/trunk@8449 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 19:22:36 +00:00
senorblanco@chromium.org
3cb406bb88
Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
...
Review URL: https://codereview.appspot.com/7230049
git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:50:46 +00:00
robertphillips@google.com
cf9faf6ce9
Reverting r7545 (render target origin change) due to layout test issues (see https://codereview.chromium.org/12210002/ )
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 14:05:06 +00:00
senorblanco@chromium.org
ed8659b51d
Implement support for origin-TopLeft render targets in GL backend.
...
Review URL: https://codereview.appspot.com/7230049
git-svn-id: http://skia.googlecode.com/svn/trunk@7545 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 17:29:51 +00:00
senorblanco@chromium.org
ef5dbe1cd9
Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down.
...
Review URL: https://codereview.appspot.com/7200048
git-svn-id: http://skia.googlecode.com/svn/trunk@7414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:42:38 +00:00
bsalomon@google.com
7283022819
Make GrResource know whether 3D objects' lifetimes are managed by Skia or not.
...
Review URL: https://codereview.appspot.com/7201046
git-svn-id: http://skia.googlecode.com/svn/trunk@7348 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:25:22 +00:00
bsalomon@google.com
0797c2ccea
Reland 6914 w/ fixes.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6916 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 15:13:01 +00:00
bsalomon@google.com
0b6ad2297f
Revert 6914 to fix build issues.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6915 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:23:26 +00:00
bsalomon@google.com
4b86e3428b
Simplify cache IDs and keys.
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6954047
git-svn-id: http://skia.googlecode.com/svn/trunk@6914 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:18:10 +00:00
bsalomon@google.com
b9086a0268
Replace GrMatrix with SkMatrix.
...
Review URL: https://codereview.appspot.com/6814067
git-svn-id: http://skia.googlecode.com/svn/trunk@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 18:02:54 +00:00
bsalomon@google.com
2d0baded0f
Make the orientation of a texture accessible from and known by GrSurface.
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6801044
git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6148 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-26 19:01:17 +00:00
bsalomon@google.com
08afc843c0
Files accidentally omitted from r6123.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6124 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 18:56:10 +00:00