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

Issue 1313743002: Add onMemoryDump to GrContext (Closed)

Created:
5 years, 4 months ago by ericrk
Modified:
5 years, 3 months ago
CC:
Primiano Tucci (use gerrit), reveman, reviews_skia.org, ssid
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add onMemoryDump to GrContext Adds an entry point to GrContext to allow enumeration and tracing of GPU resources via the newly added SkTraceMemoryDump. Plan is for Chrome to call this on each of its GrContexts. Dumps both the total size of GPU resources, as well as the total purgeable size. BUG=526261 Committed: https://skia.googlesource.com/skia/+/0a5fa484fd58d27088f8696bdc11c8cc8f2b4866

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 5

Patch Set 5 : Review feedback #

Total comments: 4

Patch Set 6 : Dump GrG #

Patch Set 7 : GrGlRenderTarget dump #

Patch Set 8 : Add missing GrGLTextureRenderTarget.cpp #

Patch Set 9 : rebase #

Patch Set 10 : int > string fix #

Total comments: 2

Patch Set 11 : Re-add missing file #

Total comments: 2

Patch Set 12 : rebase #

Patch Set 13 : Tweaks to GrGLRenderTarget #

Total comments: 5

Patch Set 14 : this-> for member fns #

Patch Set 15 : Small build fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -18 lines) Patch
M gyp/gpu.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M include/gpu/GrContext.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M include/gpu/GrGpuResource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +15 lines, -1 line 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -2 lines 0 comments Download
M src/gpu/GrGpuResource.cpp View 1 2 3 4 5 6 7 8 10 2 chunks +18 lines, -0 lines 0 comments Download
M src/gpu/GrResourceCache.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -1 line 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLIndexBuffer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLIndexBuffer.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLRenderTarget.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLRenderTarget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +61 lines, -14 lines 0 comments Download
M src/gpu/gl/GrGLStencilAttachment.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLStencilAttachment.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLTexture.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLTexture.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLTextureRenderTarget.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
A src/gpu/gl/GrGLTextureRenderTarget.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLVertexBuffer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLVertexBuffer.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M tools/BUILD.public.expected View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
ericrk
Here's a first cut of an entry point to GrContext to allow Chrome to trace ...
5 years, 4 months ago (2015-08-24 21:43:22 UTC) #2
ericrk
On 2015/08/24 at 21:43:22, ericrk wrote: > Here's a first cut of an entry point ...
5 years, 3 months ago (2015-08-26 16:19:12 UTC) #3
bsalomon
Hey Eric, sorry for the slow response. I was OOO yesterday and came back to ...
5 years, 3 months ago (2015-08-26 16:36:00 UTC) #5
ericrk
On 2015/08/26 at 16:36:00, bsalomon wrote: > Hey Eric, sorry for the slow response. I ...
5 years, 3 months ago (2015-08-26 17:01:04 UTC) #6
ericrk
https://codereview.chromium.org/1313743002/diff/60001/include/gpu/GrContext.h File include/gpu/GrContext.h (right): https://codereview.chromium.org/1313743002/diff/60001/include/gpu/GrContext.h#newcode366 include/gpu/GrContext.h:366: void onMemoryDump(SkTraceMemoryDump* traceMemoryDump) const; On 2015/08/26 at 16:36:00, bsalomon ...
5 years, 3 months ago (2015-08-26 17:01:09 UTC) #7
bsalomon
On 2015/08/26 17:01:04, ericrk wrote: > On 2015/08/26 at 16:36:00, bsalomon wrote: > > Hey ...
5 years, 3 months ago (2015-08-26 17:05:51 UTC) #8
bsalomon
lgtm, I think you missed a couple subclasses though (GrGLRenderTarget and GrGLTextureRenderTarget). https://codereview.chromium.org/1313743002/diff/60001/include/gpu/GrContext.h File include/gpu/GrContext.h ...
5 years, 3 months ago (2015-08-26 17:08:56 UTC) #9
ssid
Just one concern. Looks good. Thanks! https://codereview.chromium.org/1313743002/diff/80001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/1313743002/diff/80001/src/gpu/GrContext.cpp#newcode764 src/gpu/GrContext.cpp:764: ////////////////////////////////////////////////////////////////////////////// New line ...
5 years, 3 months ago (2015-08-26 17:10:03 UTC) #11
reed1
5 years, 3 months ago (2015-08-26 18:51:12 UTC) #13
reed1
5 years, 3 months ago (2015-08-26 19:10:01 UTC) #15
ericrk
Took a stab at adding this to GrGLTextureRenderTarget and GrGLRenderTarget. It gets a bit ugly ...
5 years, 3 months ago (2015-08-26 19:40:22 UTC) #16
bsalomon
On 2015/08/26 19:40:22, ericrk wrote: > Took a stab at adding this to GrGLTextureRenderTarget and ...
5 years, 3 months ago (2015-08-26 19:53:30 UTC) #17
ericrk
Added missing files from last upload.
5 years, 3 months ago (2015-09-01 22:39:50 UTC) #18
ssid
https://codereview.chromium.org/1313743002/diff/180001/gyp/gpu.gypi File gyp/gpu.gypi (right): https://codereview.chromium.org/1313743002/diff/180001/gyp/gpu.gypi#newcode350 gyp/gpu.gypi:350: '<(skia_src_path)/gpu/gl/GrGLTextureRenderTarget.cpp', Please add this file.
5 years, 3 months ago (2015-09-02 10:45:58 UTC) #19
ericrk
https://codereview.chromium.org/1313743002/diff/180001/gyp/gpu.gypi File gyp/gpu.gypi (right): https://codereview.chromium.org/1313743002/diff/180001/gyp/gpu.gypi#newcode350 gyp/gpu.gypi:350: '<(skia_src_path)/gpu/gl/GrGLTextureRenderTarget.cpp', On 2015/09/02 10:45:58, ssid wrote: > Please add ...
5 years, 3 months ago (2015-09-02 17:28:37 UTC) #21
bsalomon
Sorry for the slow review! Been OOO. https://codereview.chromium.org/1313743002/diff/220001/src/gpu/gl/GrGLRenderTarget.cpp File src/gpu/gl/GrGLRenderTarget.cpp (right): https://codereview.chromium.org/1313743002/diff/220001/src/gpu/gl/GrGLRenderTarget.cpp#newcode94 src/gpu/gl/GrGLRenderTarget.cpp:94: if (fMSColorRenderbufferID ...
5 years, 3 months ago (2015-09-08 15:00:49 UTC) #22
ericrk
https://codereview.chromium.org/1313743002/diff/220001/src/gpu/gl/GrGLRenderTarget.cpp File src/gpu/gl/GrGLRenderTarget.cpp (right): https://codereview.chromium.org/1313743002/diff/220001/src/gpu/gl/GrGLRenderTarget.cpp#newcode94 src/gpu/gl/GrGLRenderTarget.cpp:94: if (fMSColorRenderbufferID && fRTFBOID != 0) { On 2015/09/08 ...
5 years, 3 months ago (2015-09-14 21:55:54 UTC) #23
bsalomon
lgtm https://codereview.chromium.org/1313743002/diff/260001/src/gpu/gl/GrGLRenderTarget.cpp File src/gpu/gl/GrGLRenderTarget.cpp (right): https://codereview.chromium.org/1313743002/diff/260001/src/gpu/gl/GrGLRenderTarget.cpp#newcode47 src/gpu/gl/GrGLRenderTarget.cpp:47: fGpuMemorySize = totalSamples() * totalBytesPerSample(); tint nit: this-> ...
5 years, 3 months ago (2015-09-15 12:56:48 UTC) #24
ericrk
https://codereview.chromium.org/1313743002/diff/260001/src/gpu/gl/GrGLRenderTarget.cpp File src/gpu/gl/GrGLRenderTarget.cpp (right): https://codereview.chromium.org/1313743002/diff/260001/src/gpu/gl/GrGLRenderTarget.cpp#newcode47 src/gpu/gl/GrGLRenderTarget.cpp:47: fGpuMemorySize = totalSamples() * totalBytesPerSample(); On 2015/09/15 12:56:48, bsalomon ...
5 years, 3 months ago (2015-09-15 21:09:55 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313743002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313743002/320001
5 years, 3 months ago (2015-09-15 21:10:13 UTC) #29
commit-bot: I haz the power
5 years, 3 months ago (2015-09-15 21:16:13 UTC) #30
Message was sent while issue was closed.
Committed patchset #15 (id:320001) as
https://skia.googlesource.com/skia/+/0a5fa484fd58d27088f8696bdc11c8cc8f2b4866

Powered by Google App Engine
This is Rietveld 408576698