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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp

Issue 2508943003: Make OffscreenCanvas resizeable (Closed)
Patch Set: Created 4 years, 1 month 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/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 4599d147eaff4bf69836dff08758138327d80ca2..f5dc56f1ab7224d176d08aa43a23f8c1d9330bfc 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -100,6 +100,11 @@ bool OffscreenCanvasRenderingContext2D::hasImageBuffer() const {
return !!m_imageBuffer;
}
+void OffscreenCanvasRenderingContext2D::reset() {
+ m_imageBuffer = nullptr;
xlai (Olivia) 2016/11/21 16:26:57 This function's implementation doesn't look correc
xlai (Olivia) 2016/11/21 19:56:17 Ah I just realize that the image buffer (with a ne
+ BaseRenderingContext2D::reset();
+}
+
ImageBuffer* OffscreenCanvasRenderingContext2D::imageBuffer() const {
if (!m_imageBuffer) {
IntSize surfaceSize(width(), height());

Powered by Google App Engine
This is Rietveld 408576698