Make all pixel ops go thru ctx so we can correctly flush. Unify two texture upload code paths.
Review URL: http://codereview.appspot.com/5373108/
git-svn-id: http://skia.googlecode.com/svn/trunk@2701 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGrTexturePixelRef.cpp b/src/gpu/SkGrTexturePixelRef.cpp
index 140993a..8d0eb89 100644
--- a/src/gpu/SkGrTexturePixelRef.cpp
+++ b/src/gpu/SkGrTexturePixelRef.cpp
@@ -79,7 +79,7 @@
void* buffer = dst->getPixels();
return fTexture->readPixels(left, top, width, height,
kSkia8888_PM_GrPixelConfig,
- buffer);
+ buffer, dst->rowBytes());
} else {
return false;
}
@@ -123,7 +123,7 @@
void* buffer = dst->getPixels();
return fRenderTarget->readPixels(left, top, width, height,
kSkia8888_PM_GrPixelConfig,
- buffer);
+ buffer, dst->rowBytes());
} else {
return false;
}