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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 522733003: Make SkGrPixelRef responsible for owning GrSurface's texture rather than RT. (Closed) Base URL: https://skia.googlesource.com/skia.git@cfg
Patch Set: Created 6 years, 4 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/SkGrPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index b751c46c4a35778496058fcce8f49fbd39b3cbac..f02529756eb266e8eb4420593a09a990181ad9c3 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -150,15 +150,6 @@ SkGpuDevice::SkGpuDevice(GrSurface* surface, unsigned flags) {
fRenderTarget = SkRef(surface->asRenderTarget());
- // Hold onto to the texture in the pixel ref (if there is one) because the texture holds a ref
- // on the RT but not vice-versa.
- // TODO: Remove this trickery once we figure out how to make SkGrPixelRef do this without
- // busting chrome (for a currently unknown reason).
- surface = fRenderTarget->asTexture();
- if (NULL == surface) {
- surface = fRenderTarget;
- }
-
SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef,
(surface->info(), surface, SkToBool(flags & kCached_Flag)));
fLegacyBitmap.setInfo(surface->info());
« no previous file with comments | « no previous file | src/gpu/SkGrPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698