summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/canvas/offscreencanvas')
-rw-r--r--chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.cc28
-rw-r--r--chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.h9
-rw-r--r--chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl2
-rw-r--r--chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc2
4 files changed, 2 insertions, 39 deletions
diff --git a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.cc b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.cc
index df92f8e2c2f..ef3e28e973d 100644
--- a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.cc
+++ b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.cc
@@ -12,7 +12,6 @@
namespace blink {
-#if defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
V8OffscreenRenderingContext* OffscreenCanvasModule::getContext(
ExecutionContext* execution_context,
OffscreenCanvas& offscreen_canvas,
@@ -38,32 +37,5 @@ V8OffscreenRenderingContext* OffscreenCanvasModule::getContext(
return nullptr;
return context->AsV8OffscreenRenderingContext();
}
-#else // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
-void OffscreenCanvasModule::getContext(
- ExecutionContext* execution_context,
- OffscreenCanvas& offscreen_canvas,
- const String& id,
- const CanvasContextCreationAttributesModule* attributes,
- OffscreenRenderingContext& result,
- ExceptionState& exception_state) {
- if (offscreen_canvas.IsNeutered()) {
- exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
- "OffscreenCanvas object is detached");
- return;
- }
- CanvasContextCreationAttributesCore canvas_context_creation_attributes;
- if (!ToCanvasContextCreationAttributes(
- attributes, canvas_context_creation_attributes, exception_state)) {
- return;
- }
-
- // OffscreenCanvas cannot be transferred after getContext, so this execution
- // context will always be the right one from here on.
- CanvasRenderingContext* context = offscreen_canvas.GetCanvasRenderingContext(
- execution_context, id, canvas_context_creation_attributes);
- if (context)
- context->SetOffscreenCanvasGetContextResult(result);
-}
-#endif // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.h b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.h
index 0639ae4f416..7f25144b86c 100644
--- a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.h
+++ b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.h
@@ -21,21 +21,12 @@ class MODULES_EXPORT OffscreenCanvasModule {
STATIC_ONLY(OffscreenCanvasModule);
public:
-#if defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
static V8OffscreenRenderingContext* getContext(
ExecutionContext* execution_context,
OffscreenCanvas& offscreen_canvas,
const String& context_id,
const CanvasContextCreationAttributesModule* attributes,
ExceptionState& exception_state);
-#else // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
- static void getContext(ExecutionContext*,
- OffscreenCanvas&,
- const String&,
- const CanvasContextCreationAttributesModule*,
- OffscreenRenderingContext&,
- ExceptionState&);
-#endif // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
};
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl
index cf134948a03..7912837be53 100644
--- a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl
+++ b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl
@@ -9,7 +9,7 @@ typedef (OffscreenCanvasRenderingContext2D or
WebGL2RenderingContext or
ImageBitmapRenderingContext or
GPUCanvasContext) OffscreenRenderingContext;
-enum OffscreenRenderingContextType { "2d", "webgl", "webgl2", "bitmaprenderer", "gpupresent" };
+enum OffscreenRenderingContextType { "2d", "webgl", "webgl2", "bitmaprenderer", "gpupresent", "webgpu" };
[
ImplementedAs=OffscreenCanvasModule
diff --git a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc
index 92ffb0ee1e4..b2869c35d9f 100644
--- a/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc
+++ b/chromium/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_test.cc
@@ -149,7 +149,7 @@ TEST_P(OffscreenCanvasTest, CompositorFrameOpacity) {
const auto canvas_resource = CanvasResourceSharedBitmap::Create(
offscreen_canvas().Size(), CanvasResourceParams(), nullptr /* provider */,
- kLow_SkFilterQuality);
+ cc::PaintFlags::FilterQuality::kLow);
EXPECT_TRUE(!!canvas_resource);
EXPECT_CALL(mock_embedded_frame_sink_provider.mock_compositor_frame_sink(),