Chromium Code Reviews| Index: src/gpu/SkGrPixelRef.cpp |
| diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp |
| index dc5d7558f0d7a3e5c0294ec59f08f1622ef0ea16..d5d957f5cadb1c78db0225c071a5eccfc2e43c1a 100644 |
| --- a/src/gpu/SkGrPixelRef.cpp |
| +++ b/src/gpu/SkGrPixelRef.cpp |
| @@ -24,10 +24,8 @@ SkROLockPixelsPixelRef::SkROLockPixelsPixelRef() : INHERITED(&gROLockPixelsPixel |
| SkROLockPixelsPixelRef::~SkROLockPixelsPixelRef() { |
| } |
| -void* SkROLockPixelsPixelRef::onLockPixels(SkColorTable** ctable) { |
| - if (ctable) { |
| - *ctable = NULL; |
| - } |
| +void* SkROLockPixelsPixelRef::onLockPixels(SkImageInfo* info, size_t* rowBytes, |
| + SkColorTable** ctable) { |
| fBitmap.reset(); |
| // SkDebugf("---------- calling readpixels in support of lockpixels\n"); |
| if (!this->onReadPixels(&fBitmap, NULL)) { |
| @@ -35,6 +33,10 @@ void* SkROLockPixelsPixelRef::onLockPixels(SkColorTable** ctable) { |
| return NULL; |
| } |
| fBitmap.lockPixels(); |
| + |
| + fBitmap.asImageInfo(info); |
| + *rowBytes = fBitmap.rowBytes(); |
| + *ctable = NULL; |
|
scroggo
2013/11/19 18:17:09
Why did you remove the check for NULL here, but pr
reed1
2013/11/20 20:56:56
no good reason. I'll remove it from imageref too.
|
| return fBitmap.getPixels(); |
| } |