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

Unified Diff: src/gpu/GrAtlas.h

Issue 354533004: Begin atlasing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Readd missing file Created 6 years, 6 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 | « src/core/SkPicturePlayback.cpp ('k') | 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 49a7bacf2768ad7b96416832718bb513ce65898a..d63c8b920cecac006866ebf9c27c6395007b514c 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -81,13 +81,17 @@ public:
friend class GrAtlas;
};
- GrAtlas(GrGpu*, GrPixelConfig, const SkISize& backingTextureSize,
+ GrAtlas(GrGpu*, GrPixelConfig, GrTextureFlags flags,
+ const SkISize& backingTextureSize,
int numPlotsX, int numPlotsY, bool batchUploads);
~GrAtlas();
- // add subimage of width, height dimensions to atlas
- // returns the containing GrPlot and location relative to the backing texture
- GrPlot* addToAtlas(ClientPlotUsage*, int width, int height, const void*, SkIPoint16*);
+ // Adds a width x height subimage to the atlas. Upon success it returns
+ // the containing GrPlot and absolute location in the backing texture.
+ // NULL is returned if the subimage cannot fit in the atlas.
+ // If provided, the image data will either be immediately uploaded or
+ // written to the CPU-side backing bitmap.
+ GrPlot* addToAtlas(ClientPlotUsage*, int width, int height, const void* image, SkIPoint16* loc);
// remove reference to this plot
void removePlot(ClientPlotUsage* usage, const GrPlot* plot);
@@ -105,13 +109,14 @@ public:
private:
void makeMRU(GrPlot* plot);
- GrGpu* fGpu;
- GrPixelConfig fPixelConfig;
- GrTexture* fTexture;
- SkISize fBackingTextureSize;
- int fNumPlotsX;
- int fNumPlotsY;
- bool fBatchUploads;
+ GrGpu* fGpu;
+ GrPixelConfig fPixelConfig;
+ GrTextureFlags fFlags;
+ GrTexture* fTexture;
+ SkISize fBackingTextureSize;
+ int fNumPlotsX;
+ int fNumPlotsY;
+ bool fBatchUploads;
// allocated array of GrPlots
GrPlot* fPlotArray;
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698