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

Issue 269423007: Add CPU backing store for GrAtlas to reduce texture uploads (Closed)

Created:
6 years, 7 months ago by jvanverth1
Modified:
6 years, 7 months ago
Reviewers:
robertphillips
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Add CPU backing store for GrAtlas to reduce texture uploads. This change creates a temporary copy of each GrPlot on the CPU side. As we add glyphs to a plot, a dirty rectangle is tracked, and just before we render text we upload all of the dirty areas to the atlas texture. Once a plot is nearly full, we assume that we may only be adding one or two glyphs before rendering, so we delete the CPU backing memory to save space, and upload directly. BUG=366225 Committed: http://code.google.com/p/skia/source/detail?r=14729

Patch Set 1 #

Patch Set 2 : Allocate backing memory for atlas transfers on a per-plot basis. #

Patch Set 3 : Rebase to master #

Patch Set 4 : Turn on texture update for distance fields #

Total comments: 10

Patch Set 5 : Fix issues #

Patch Set 6 : Add flag to enable upload batching #

Patch Set 7 : Initialize fBatchUploads in GrPlot. #

Total comments: 2

Patch Set 8 : Rebase to ToT #

Patch Set 9 : Add assert to GrPlot::uploadTexture() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -22 lines) Patch
M src/gpu/GrAtlas.h View 1 2 3 4 5 4 chunks +12 lines, -2 lines 0 comments Download
M src/gpu/GrAtlas.cpp View 1 2 3 4 5 6 7 8 6 chunks +101 lines, -17 lines 0 comments Download
M src/gpu/GrBitmapTextContext.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrBitmapTextContext.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrDistanceFieldTextContext.cpp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrLayerCache.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrTextStrike.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/gpu/GrTextStrike.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
jvanverth1
This is not quite done. We'd need to add a fContext->getFontCache()->updateTextures() or equivalent call for ...
6 years, 7 months ago (2014-05-12 19:06:04 UTC) #1
robertphillips
https://codereview.chromium.org/269423007/diff/50001/src/gpu/GrAtlas.cpp File src/gpu/GrAtlas.cpp (right): https://codereview.chromium.org/269423007/diff/50001/src/gpu/GrAtlas.cpp#newcode59 src/gpu/GrAtlas.cpp:59: // create backing memory on first use // Once ...
6 years, 7 months ago (2014-05-12 19:45:51 UTC) #2
jvanverth1
https://codereview.chromium.org/269423007/diff/50001/src/gpu/GrAtlas.cpp File src/gpu/GrAtlas.cpp (right): https://codereview.chromium.org/269423007/diff/50001/src/gpu/GrAtlas.cpp#newcode59 src/gpu/GrAtlas.cpp:59: // create backing memory on first use On 2014/05/12 ...
6 years, 7 months ago (2014-05-12 20:44:04 UTC) #3
jvanverth1
Added a flag to GrAtlasMgr and GrPlot to enable batching. GrLayerCache will not use batching, ...
6 years, 7 months ago (2014-05-14 14:21:36 UTC) #4
robertphillips
lgtm + 1 question https://codereview.chromium.org/269423007/diff/110001/src/gpu/GrAtlas.cpp File src/gpu/GrAtlas.cpp (right): https://codereview.chromium.org/269423007/diff/110001/src/gpu/GrAtlas.cpp#newcode106 src/gpu/GrAtlas.cpp:106: void GrPlot::uploadToTexture() { SkASSERT(fBatchUploads); ?
6 years, 7 months ago (2014-05-14 14:46:18 UTC) #5
jvanverth1
https://codereview.chromium.org/269423007/diff/110001/src/gpu/GrAtlas.cpp File src/gpu/GrAtlas.cpp (right): https://codereview.chromium.org/269423007/diff/110001/src/gpu/GrAtlas.cpp#newcode106 src/gpu/GrAtlas.cpp:106: void GrPlot::uploadToTexture() { On 2014/05/14 14:46:19, robertphillips wrote: > ...
6 years, 7 months ago (2014-05-14 15:01:32 UTC) #6
jvanverth1
The CQ bit was checked by jvanverth@google.com
6 years, 7 months ago (2014-05-14 15:01:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/269423007/150001
6 years, 7 months ago (2014-05-14 15:01:50 UTC) #8
commit-bot: I haz the power
6 years, 7 months ago (2014-05-14 15:15:04 UTC) #9
Message was sent while issue was closed.
Change committed as 14729

Powered by Google App Engine
This is Rietveld 408576698