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

Unified Diff: src/gpu/GrAtlas.h

Issue 269423007: Add CPU backing store for GrAtlas to reduce texture uploads (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Turn on texture update for distance fields Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrAtlas.cpp » ('j') | src/gpu/GrAtlas.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.h
diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
index d7f533414143214dce46d41c3bbf7cca4c52bdfc..b80de028882db2ee67e7c85adac04cf3f78a8e58 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -40,6 +40,8 @@ public:
GrDrawTarget::DrawToken drawToken() const { return fDrawToken; }
void setDrawToken(GrDrawTarget::DrawToken draw) { fDrawToken = draw; }
+ void uploadToTexture();
+
void resetRects();
private:
@@ -50,11 +52,14 @@ private:
// for recycling
GrDrawTarget::DrawToken fDrawToken;
+ unsigned char* fPlotData;
GrTexture* fTexture;
GrRectanizer* fRects;
GrAtlasMgr* fAtlasMgr;
GrIPoint16 fOffset; // the offset of the plot in the backing texture
size_t fBytesPerPixel;
+ SkIRect fDirtyRect;
+ bool fDirty;
friend class GrAtlasMgr;
};
@@ -82,6 +87,8 @@ public:
return fTexture;
}
+ void uploadPlotsToTexture();
+
private:
void moveToHead(GrPlot* plot);
« no previous file with comments | « no previous file | src/gpu/GrAtlas.cpp » ('j') | src/gpu/GrAtlas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698