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

Unified Diff: src/core/SkBitmap.cpp

Issue 132273004: use bitmap's fRowBytes, as the pixelref's is not (yet) reliable (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index cb8ac7231b29a9728dcf0d4804c6660c40291a04..f950e28cdccb2ca6b3a8a57ee9dc387621172f16 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -341,7 +341,7 @@ void SkBitmap::updatePixelsFromRef() const {
void* p = fPixelRef->pixels();
if (NULL != p) {
p = (char*)p
- + fPixelRef->rowBytes() * fPixelRefOrigin.fY
+ + fPixelRefOrigin.fY * fRowBytes
+ fPixelRefOrigin.fX * fBytesPerPixel;
}
fPixels = p;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698