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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 2802353002: getImageData now finalizesFrame and disableAcceleration updates composit (Closed)
Patch Set: merge Created 3 years, 8 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
Index: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
index 9b239fabc7e2e614911e3d62f11b5d8e2080b306..9653160eccf6da95850252b47b4b17683b287e83 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -1539,7 +1539,7 @@ ImageData* BaseRenderingContext2D::getImageData(
int sy,
int sw,
int sh,
- ExceptionState& exception_state) const {
+ ExceptionState& exception_state) {
if (!WTF::CheckMul(sw, sh).IsValid<int>()) {
exception_state.ThrowRangeError("Out of memory at ImageData creation");
return nullptr;
@@ -1609,6 +1609,8 @@ ImageData* BaseRenderingContext2D::getImageData(
return nullptr;
}
+ NeedsFinalizeFrame();
+
DOMArrayBuffer* array_buffer = DOMArrayBuffer::Create(contents);
return ImageData::Create(image_data_rect.size(),
DOMUint8ClampedArray::Create(

Powered by Google App Engine
This is Rietveld 408576698