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

Unified Diff: src/gpu/GrAtlas.h

Issue 391153002: Add unique ID to GrPlot (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix initialization list order Created 6 years, 5 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') | no next file with comments »
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 f99040863b2d14c63da42b828d06b10d1db0fa53..2248f67b85a43880d636ed112a0add415ebb3d9c 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -32,6 +32,10 @@ class GrPlot {
public:
SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrPlot);
+ // This returns a plot ID unique to each plot in a given GrAtlas. They are
+ // consecutive and start at 0.
+ int id() const { return fID; }
+
GrTexture* texture() const { return fTexture; }
bool addSubImage(int width, int height, const void*, SkIPoint16*);
@@ -46,12 +50,13 @@ public:
private:
GrPlot();
~GrPlot(); // does not try to delete the fNext field
- void init(GrAtlas* atlas, int offX, int offY, int width, int height, size_t bpp,
+ void init(GrAtlas* atlas, int id, int offX, int offY, int width, int height, size_t bpp,
bool batchUploads);
// for recycling
GrDrawTarget::DrawToken fDrawToken;
+ int fID;
unsigned char* fPlotData;
GrTexture* fTexture;
GrRectanizer* fRects;
« no previous file with comments | « no previous file | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698