Adds read pixels to GrTexture and GrRenderTarget
Adds SkGrRenderTargetPixelRef for SkBitmaps that are backed by RTs that aren't textures.
Adds onReadPixels implementations for SkGr pixel ref types
git-svn-id: http://skia.googlecode.com/svn/trunk@1056 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index a9b9c99..c19e84d 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -869,10 +869,7 @@
SkBitmap tmpSrc;
const SkBitmap* src = this;
- if (this->getTexture()) {
- if (!fPixelRef->readPixels(&tmpSrc)) {
- return false;
- }
+ if (fPixelRef && fPixelRef->readPixels(&tmpSrc)) {
SkASSERT(tmpSrc.width() == this->width());
SkASSERT(tmpSrc.height() == this->height());