Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed)

Created:
6 years, 8 months ago by Chris Dalton
Modified:
6 years, 7 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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: Committed: http://code.google.com/p/skia/source/detail?r=14553

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : Rename GrGpuObject::isValid() -> GrGpuObject::wasDestroyed() #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -451 lines) Patch
M bench/GrResourceCacheBench.cpp View 1 2 3 4 5 10 chunks +27 lines, -27 lines 0 comments Download
M gyp/gpu.gypi View 1 2 3 4 5 4 chunks +3 lines, -2 lines 0 comments Download
A include/gpu/GrCacheable.h View 1 3 1 chunk +55 lines, -0 lines 0 comments Download
M include/gpu/GrContext.h View 2 chunks +3 lines, -2 lines 0 comments Download
A + include/gpu/GrGpuObject.h View 1 2 3 4 7 chunks +31 lines, -44 lines 0 comments Download
M include/gpu/GrRenderTarget.h View 1 chunk +1 line, -1 line 0 comments Download
D include/gpu/GrResource.h View 1 chunk +0 lines, -143 lines 0 comments Download
M include/gpu/GrSurface.h View 2 chunks +3 lines, -3 lines 0 comments Download
M include/gpu/GrTexture.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrBufferAllocPool.cpp View 7 chunks +7 lines, -7 lines 0 comments Download
M src/gpu/GrContext.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M src/gpu/GrDrawTarget.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrGeometryBuffer.h View 2 chunks +8 lines, -8 lines 0 comments Download
M src/gpu/GrGpu.h View 1 2 3 4 5 4 chunks +9 lines, -10 lines 0 comments Download
M src/gpu/GrGpu.cpp View 1 2 3 4 5 3 chunks +14 lines, -14 lines 0 comments Download
A + src/gpu/GrGpuObject.cpp View 1 2 3 4 2 chunks +11 lines, -12 lines 0 comments Download
M src/gpu/GrIndexBuffer.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/gpu/GrPath.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrRenderTarget.cpp View 1 chunk +1 line, -1 line 0 comments Download
D src/gpu/GrResource.cpp View 1 chunk +0 lines, -61 lines 0 comments Download
M src/gpu/GrResourceCache.h View 11 chunks +25 lines, -25 lines 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 2 3 4 5 18 chunks +32 lines, -32 lines 0 comments Download
M src/gpu/GrStencilBuffer.h View 3 chunks +4 lines, -5 lines 0 comments Download
M src/gpu/GrVertexBuffer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/SkGrPixelRef.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLIndexBuffer.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLIndexBuffer.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGLPath.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLStencilBuffer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLStencilBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLVertexArray.h View 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGLVertexArray.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLVertexBuffer.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLVertexBuffer.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGpuGL.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tests/ResourceCacheTest.cpp View 7 chunks +14 lines, -14 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Chris Dalton
All the patchsets were finding the right value to use for '--similarity', to get the ...
6 years, 8 months ago (2014-04-25 20:59:01 UTC) #1
bsalomon
https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h File include/gpu/GrGpuObject.h (right): https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h#newcode75 include/gpu/GrGpuObject.h:75: virtual bool isValidOnGpu() const SK_OVERRIDE { return this->isValid(); } ...
6 years, 7 months ago (2014-04-28 14:23:47 UTC) #2
Chris Dalton
https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h File include/gpu/GrGpuObject.h (right): https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h#newcode75 include/gpu/GrGpuObject.h:75: virtual bool isValidOnGpu() const SK_OVERRIDE { return this->isValid(); } ...
6 years, 7 months ago (2014-04-28 16:19:23 UTC) #3
bsalomon
On 2014/04/28 16:19:23, Chris Dalton wrote: > https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h > File include/gpu/GrGpuObject.h (right): > > https://codereview.chromium.org/251013002/diff/60001/include/gpu/GrGpuObject.h#newcode75 ...
6 years, 7 months ago (2014-04-28 18:14:48 UTC) #4
Chris Dalton
The CQ bit was checked by cdalton@nvidia.com
6 years, 7 months ago (2014-05-02 18:31:49 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/cdalton@nvidia.com/251013002/80001
6 years, 7 months ago (2014-05-02 18:32:03 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 18:37:33 UTC) #7
commit-bot: I haz the power
Retried try job too often on Build-Ubuntu13.10-GCC4.8-x86_64-Release-Trybot for step(s) BuildBench, BuildEverything, BuildGm, BuildSkiaLib, BuildTests, BuildTools ...
6 years, 7 months ago (2014-05-02 18:37:34 UTC) #8
Chris Dalton
The CQ bit was checked by cdalton@nvidia.com
6 years, 7 months ago (2014-05-02 21:31:21 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/cdalton@nvidia.com/251013002/100001
6 years, 7 months ago (2014-05-02 21:31:35 UTC) #10
commit-bot: I haz the power
6 years, 7 months ago (2014-05-02 21:38:43 UTC) #11
Message was sent while issue was closed.
Change committed as 14553

Powered by Google App Engine
This is Rietveld 408576698