| Index: src/gpu/SkGrPixelRef.cpp
|
| diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
|
| index feac9b10f373bc4e9300617a329db689cc40d0b5..fcdb15012775abce1c0cb1c472bef0960077994e 100644
|
| --- a/src/gpu/SkGrPixelRef.cpp
|
| +++ b/src/gpu/SkGrPixelRef.cpp
|
| @@ -101,8 +101,7 @@ static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorTyp
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -SkGrPixelRef::SkGrPixelRef(const SkImageInfo& info, GrSurface* surface,
|
| - bool transferCacheLock) : INHERITED(info) {
|
| +SkGrPixelRef::SkGrPixelRef(const SkImageInfo& info, GrSurface* surface) : INHERITED(info) {
|
| // For surfaces that are both textures and render targets, the texture owns the
|
| // render target but not vice versa. So we ref the texture to keep both alive for
|
| // the lifetime of this pixel ref.
|
| @@ -110,7 +109,6 @@ SkGrPixelRef::SkGrPixelRef(const SkImageInfo& info, GrSurface* surface,
|
| if (NULL == fSurface) {
|
| fSurface = SkSafeRef(surface);
|
| }
|
| - fUnlock = transferCacheLock;
|
|
|
| if (fSurface) {
|
| SkASSERT(info.width() <= fSurface->width());
|
| @@ -119,13 +117,6 @@ SkGrPixelRef::SkGrPixelRef(const SkImageInfo& info, GrSurface* surface,
|
| }
|
|
|
| SkGrPixelRef::~SkGrPixelRef() {
|
| - if (fUnlock) {
|
| - GrContext* context = fSurface->getContext();
|
| - GrTexture* texture = fSurface->asTexture();
|
| - if (context && texture) {
|
| - context->unlockScratchTexture(texture);
|
| - }
|
| - }
|
| SkSafeUnref(fSurface);
|
| }
|
|
|
|
|