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

Unified Diff: src/gpu/GrAtlas.cpp

Issue 25736002: Add support to dump font cache texture for debug purposes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add stencil flag Created 7 years, 2 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 | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.cpp
diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp
index ff1498388a7ec0a45f3c1a78db97d9d3df3cdef2..395bfdfd5196dac15c467221b258fa60e3c6062a 100644
--- a/src/gpu/GrAtlas.cpp
+++ b/src/gpu/GrAtlas.cpp
@@ -179,7 +179,13 @@ GrPlot* GrAtlasMgr::addToAtlas(GrAtlas* atlas,
if (NULL == fTexture) {
// TODO: Update this to use the cache rather than directly creating a texture.
GrTextureDesc desc;
+#ifdef SK_DEVELOPER
+ // RenderTarget so we can read the pixels to dump them
+ desc.fFlags = kDynamicUpdate_GrTextureFlagBit|kRenderTarget_GrTextureFlagBit
+ |kNoStencil_GrTextureFlagBit;
+#else
desc.fFlags = kDynamicUpdate_GrTextureFlagBit;
+#endif
desc.fWidth = GR_ATLAS_TEXTURE_WIDTH;
desc.fHeight = GR_ATLAS_TEXTURE_HEIGHT;
desc.fConfig = fPixelConfig;
@@ -205,6 +211,7 @@ GrPlot* GrAtlasMgr::addToAtlas(GrAtlas* atlas,
}
bool GrAtlasMgr::removeUnusedPlots(GrAtlas* atlas) {
+
// GrPlot** is used so that the head element can be easily
// modified when the first element is deleted
GrPlot** plotRef = &atlas->fPlots;
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698