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

Unified Diff: src/image/SkSurface_Gpu.cpp

Issue 20354003: Make SkImage_Gpu share it's pixelref with the surface to prevent premature return to scratch pool. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « src/image/SkImage_Gpu.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Gpu.cpp
===================================================================
--- src/image/SkSurface_Gpu.cpp (revision 10357)
+++ src/image/SkSurface_Gpu.cpp (working copy)
@@ -72,10 +72,7 @@
}
SkImage* SkSurface_Gpu::onNewImageSnapshot() {
-
- GrRenderTarget* rt = fDevice->accessRenderTarget();
-
- return SkImage::NewTexture(rt->asTexture());
+ return SkImage::NewTexture(fDevice->accessBitmap(false));
}
void SkSurface_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698