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

Unified Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 455863002: Fixing bug in RecordingImageBufferSurface::writePixels when using DisplayList2DCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 4 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 | « Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 45b0e19af270b8c6827e738a1a733967283f6aac..6d997d37b09ffc368e0cffcc4e47efa54a01b52b 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -350,7 +350,7 @@ PassRefPtr<Uint8ClampedArray> ImageBuffer::getImageData(Multiply multiplied, con
SkAlphaType alphaType = (multiplied == Premultiplied) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType;
SkImageInfo info = SkImageInfo::Make(rect.width(), rect.height(), kRGBA_8888_SkColorType, alphaType);
- m_surface->willReadback();
+ m_surface->willAccessPixels();
context()->readPixels(info, result->data(), 4 * rect.width(), rect.x(), rect.y());
return result.release();
}
@@ -382,6 +382,8 @@ void ImageBuffer::putByteArray(Multiply multiplied, Uint8ClampedArray* source, c
SkAlphaType alphaType = (multiplied == Premultiplied) ? kPremul_SkAlphaType : kUnpremul_SkAlphaType;
SkImageInfo info = SkImageInfo::Make(sourceRect.width(), sourceRect.height(), kRGBA_8888_SkColorType, alphaType);
+ m_surface->willAccessPixels();
+
context()->writePixels(info, srcAddr, srcBytesPerRow, destX, destY);
}
« no previous file with comments | « Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698