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

Unified Diff: Source/core/frame/ImageBitmapTest.cpp

Issue 795833004: Use dictionaries for context creation attributes. Eliminate custom bindings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years 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/core/dom/Document.cpp ('k') | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/ImageBitmapTest.cpp
diff --git a/Source/core/frame/ImageBitmapTest.cpp b/Source/core/frame/ImageBitmapTest.cpp
index 064c9ef74e8ce2433c81fe4572c72431c7ea15e9..6fa19ad4608f4110f513ad55a71434a750a5c87a 100644
--- a/Source/core/frame/ImageBitmapTest.cpp
+++ b/Source/core/frame/ImageBitmapTest.cpp
@@ -42,6 +42,7 @@
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/canvas/CanvasRenderingContext2D.h"
+#include "core/html/canvas/WebGLRenderingContext.h"
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/skia/NativeImageSkia.h"
#include "platform/heap/Handle.h"
@@ -207,11 +208,13 @@ TEST_F(ImageBitmapTest, ImageResourceLifetime)
RefPtrWillBeRawPtr<ImageBitmap> imageBitmapFromCanvas = ImageBitmap::create(canvasElement.get(), IntRect(0, 0, canvasElement->width(), canvasElement->height()));
imageBitmapDerived = ImageBitmap::create(imageBitmapFromCanvas.get(), IntRect(0, 0, 20, 20));
}
- CanvasRenderingContext* context = canvasElement->getContext("2d");
+ CanvasContextCreationAttributes attributes;
+ CanvasRenderingContext2DOrWebGLRenderingContext context;
+ canvasElement->getContext("2d", attributes, context);
TrackExceptionState exceptionState;
CanvasImageSourceUnion imageSource;
imageSource.setImageBitmap(imageBitmapDerived);
- toCanvasRenderingContext2D(context)->drawImage(imageSource, 0, 0, exceptionState);
+ context.getAsCanvasRenderingContext2D()->drawImage(imageSource, 0, 0, exceptionState);
}
} // namespace
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698