Enable DMSAA On 2D canvas rendering contexts that use OOP Rasterization.
Adds an MsaaMode argument to BeginRasterCHROMIUM to allow clients to
chose between legacy MSAA and DMSAA. This is required so that we can
enable DMSAA for 2D canvas without affecting general CC tile rendering.
Bug: 1228721, 1230772
Change-Id: Icd0684b3ed6d8669124fa0688a775042c6351866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3025147
Commit-Queue: Justin Novosad <junov@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903531}
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 4cec1f3..d0546a6 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -380,7 +380,8 @@
constexpr GLuint msaa_sample_count = -1;
constexpr bool can_use_lcd_text = true;
ri->BeginRasterCHROMIUM(background_color, needs_clear, msaa_sample_count,
- can_use_lcd_text, gfx::ColorSpace::CreateSRGB(),
+ gpu::raster::kNoMSAA, can_use_lcd_text,
+ gfx::ColorSpace::CreateSRGB(),
backing->mailbox.name);
gfx::Vector2dF post_translate(0.f, 0.f);
gfx::Vector2dF post_scale(1.f, 1.f);
diff --git a/cc/paint/oop_pixeltest.cc b/cc/paint/oop_pixeltest.cc
index 4bb65676..841a912 100644
--- a/cc/paint/oop_pixeltest.cc
+++ b/cc/paint/oop_pixeltest.cc
@@ -179,11 +179,16 @@
raster_implementation->WaitSyncTokenCHROMIUM(
sii->GenUnverifiedSyncToken().GetConstData());
+ // Assume legacy MSAA if sample count is positive.
+ gpu::raster::MsaaMode msaa_mode = options.msaa_sample_count > 0
+ ? gpu::raster::kMSAA
+ : gpu::raster::kNoMSAA;
+
if (options.preclear) {
raster_implementation->BeginRasterCHROMIUM(
options.preclear_color, /*needs_clear=*/options.preclear,
- options.msaa_sample_count, options.use_lcd_text, options.color_space,
- mailbox.name);
+ options.msaa_sample_count, msaa_mode, options.use_lcd_text,
+ options.color_space, mailbox.name);
raster_implementation->EndRasterCHROMIUM();
}
@@ -193,8 +198,8 @@
// cleared, so set |needs_clear| to false here.
raster_implementation->BeginRasterCHROMIUM(
options.background_color, /*needs_clear=*/!options.preclear,
- options.msaa_sample_count, options.use_lcd_text, options.color_space,
- mailbox.name);
+ options.msaa_sample_count, msaa_mode, options.use_lcd_text,
+ options.color_space, mailbox.name);
size_t max_op_size_limit =
gpu::raster::RasterInterface::kDefaultMaxOpSizeHint;
raster_implementation->RasterCHROMIUM(
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc
index ded0950..2af2773 100644
--- a/cc/raster/gpu_raster_buffer_provider.cc
+++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -78,10 +78,15 @@
ri->WaitSyncTokenCHROMIUM(sync_token.GetConstData());
}
+ // Assume legacy MSAA if sample count is positive.
+ gpu::raster::MsaaMode msaa_mode = playback_settings.msaa_sample_count > 0
+ ? gpu::raster::kMSAA
+ : gpu::raster::kNoMSAA;
+
ri->BeginRasterCHROMIUM(
raster_source->background_color(), mailbox_needs_clear,
- playback_settings.msaa_sample_count, playback_settings.use_lcd_text,
- color_space, mailbox->name);
+ playback_settings.msaa_sample_count, msaa_mode,
+ playback_settings.use_lcd_text, color_space, mailbox->name);
gfx::Vector2dF recording_to_raster_scale = transform.scale();
recording_to_raster_scale.Scale(1 / raster_source->recording_scale_factor());
gfx::Size content_size = raster_source->GetContentSize(transform.scale());
diff --git a/cc/raster/raster_buffer_provider_unittest.cc b/cc/raster/raster_buffer_provider_unittest.cc
index 0c37113..9ba0950 100644
--- a/cc/raster/raster_buffer_provider_unittest.cc
+++ b/cc/raster/raster_buffer_provider_unittest.cc
@@ -176,6 +176,7 @@
void BeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ gpu::raster::MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) override {}
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
index cb59ce6..27912720 100644
--- a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
+++ b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
@@ -392,6 +392,7 @@
crbug.com/1044638 [ mac amd ] conformance2/rendering/framebuffer-texture-level1.html [ RetryOnFailure ]
crbug.com/1214931 [ mojave amd-0x6821 angle-opengl passthrough ] deqp/functional/gles3/shadertexturefunction/texturesize.html [ RetryOnFailure ]
+crbug.com/1230781 [ mac amd-0x6821 ] conformance/canvas/to-data-url-test.html [ Failure ]
# The transformfeedback tests are specialized for two different AMD
# GPUs because of different failure modes on each.
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt
index 4a7bcdb..5aa334d 100644
--- a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt
+++ b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt
@@ -448,6 +448,7 @@
crbug.com/1203167 [ mac amd angle-disabled ] conformance/extensions/oes-texture-float-with-video.html [ RetryOnFailure ]
crbug.com/1203167 [ mac amd angle-opengl ] conformance/extensions/oes-texture-float-with-video.html [ RetryOnFailure ]
crbug.com/1203167 [ mac amd angle-metal ] conformance/extensions/oes-texture-float-with-video.html [ RetryOnFailure ]
+crbug.com/1230781 [ mac amd-0x6821 ] conformance/canvas/to-data-url-test.html [ Failure ]
# TODO(kbr): uncomment the following expectation after test has
# been made more robust.
diff --git a/gpu/command_buffer/build_raster_cmd_buffer.py b/gpu/command_buffer/build_raster_cmd_buffer.py
index de0bf1a2..f0832ff 100755
--- a/gpu/command_buffer/build_raster_cmd_buffer.py
+++ b/gpu/command_buffer/build_raster_cmd_buffer.py
@@ -141,6 +141,15 @@
'viz::ResourceFormat::ETC1',
],
},
+ 'gpu::raster::MsaaMode': {
+ 'type': 'gpu::raster::MsaaMode',
+ 'is_complete': True,
+ 'valid': [
+ 'gpu::raster::MsaaMode::kNoMSAA',
+ 'gpu::raster::MsaaMode::kMSAA',
+ 'gpu::raster::MsaaMode::kDMSAA',
+ ],
+ },
}
# A function info object specifies the type and other special data for the
diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn
index eec19c8..f8078b8 100644
--- a/gpu/command_buffer/client/BUILD.gn
+++ b/gpu/command_buffer/client/BUILD.gn
@@ -204,6 +204,7 @@
"//base",
"//components/viz/common:resource_format",
"//gpu/command_buffer/common",
+ "//gpu/command_buffer/common:raster",
"//skia:skia",
"//ui/gfx:buffer_types",
]
diff --git a/gpu/command_buffer/client/raster_cmd_helper_autogen.h b/gpu/command_buffer/client/raster_cmd_helper_autogen.h
index ea43381..f04db3d 100644
--- a/gpu/command_buffer/client/raster_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/raster_cmd_helper_autogen.h
@@ -91,6 +91,7 @@
void BeginRasterCHROMIUMImmediate(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ gpu::raster::MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const GLbyte* mailbox) {
const uint32_t size =
@@ -99,8 +100,8 @@
GetImmediateCmdSpaceTotalSize<raster::cmds::BeginRasterCHROMIUMImmediate>(
size);
if (c) {
- c->Init(sk_color, needs_clear, msaa_sample_count, can_use_lcd_text,
- mailbox);
+ c->Init(sk_color, needs_clear, msaa_sample_count, msaa_mode,
+ can_use_lcd_text, mailbox);
}
}
diff --git a/gpu/command_buffer/client/raster_implementation.cc b/gpu/command_buffer/client/raster_implementation.cc
index c52227671..64d0b4bb 100644
--- a/gpu/command_buffer/client/raster_implementation.cc
+++ b/gpu/command_buffer/client/raster_implementation.cc
@@ -1308,13 +1308,15 @@
GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) {
DCHECK(!raster_properties_);
- helper_->BeginRasterCHROMIUMImmediate(
- sk_color, needs_clear, msaa_sample_count, can_use_lcd_text, mailbox);
+ helper_->BeginRasterCHROMIUMImmediate(sk_color, needs_clear,
+ msaa_sample_count, msaa_mode,
+ can_use_lcd_text, mailbox);
raster_properties_.emplace(sk_color, can_use_lcd_text,
color_space.ToSkColorSpace());
diff --git a/gpu/command_buffer/client/raster_implementation.h b/gpu/command_buffer/client/raster_implementation.h
index a2445b2..bbc24062 100644
--- a/gpu/command_buffer/client/raster_implementation.h
+++ b/gpu/command_buffer/client/raster_implementation.h
@@ -140,6 +140,7 @@
void BeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) override;
diff --git a/gpu/command_buffer/client/raster_implementation_gles.cc b/gpu/command_buffer/client/raster_implementation_gles.cc
index 1db20329..4721307 100644
--- a/gpu/command_buffer/client/raster_implementation_gles.cc
+++ b/gpu/command_buffer/client/raster_implementation_gles.cc
@@ -211,6 +211,7 @@
GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) {
diff --git a/gpu/command_buffer/client/raster_implementation_gles.h b/gpu/command_buffer/client/raster_implementation_gles.h
index 09fc602..2cc30bb 100644
--- a/gpu/command_buffer/client/raster_implementation_gles.h
+++ b/gpu/command_buffer/client/raster_implementation_gles.h
@@ -83,6 +83,7 @@
void BeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) override;
diff --git a/gpu/command_buffer/client/raster_interface.h b/gpu/command_buffer/client/raster_interface.h
index 4b569dc..1bdd177 100644
--- a/gpu/command_buffer/client/raster_interface.h
+++ b/gpu/command_buffer/client/raster_interface.h
@@ -11,6 +11,7 @@
#include "base/containers/span.h"
#include "components/viz/common/resources/resource_format.h"
#include "gpu/command_buffer/client/interface_base.h"
+#include "gpu/command_buffer/common/raster_cmd_enums.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkYUVAInfo.h"
@@ -74,9 +75,12 @@
const gpu::Mailbox yuva_plane_mailboxes[]) = 0;
// OOP-Raster
+
+ // msaa_sample_count has no effect unless msaa_mode is set to kMSAA
virtual void BeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const gfx::ColorSpace& color_space,
const GLbyte* mailbox) = 0;
diff --git a/gpu/command_buffer/common/BUILD.gn b/gpu/command_buffer/common/BUILD.gn
index e8d71ac..936b345 100644
--- a/gpu/command_buffer/common/BUILD.gn
+++ b/gpu/command_buffer/common/BUILD.gn
@@ -161,6 +161,7 @@
visibility = [ "//gpu/*" ]
sources = [
+ "raster_cmd_enums.h",
"raster_cmd_format.cc",
"raster_cmd_format.h",
"raster_cmd_format_autogen.h",
diff --git a/gpu/command_buffer/common/raster_cmd_enums.h b/gpu/command_buffer/common/raster_cmd_enums.h
new file mode 100644
index 0000000..fa510e5
--- /dev/null
+++ b/gpu/command_buffer/common/raster_cmd_enums.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GPU_COMMAND_BUFFER_COMMON_RASTER_CMD_ENUMS_H_
+#define GPU_COMMAND_BUFFER_COMMON_RASTER_CMD_ENUMS_H_
+
+#include <stdint.h>
+
+namespace gpu {
+namespace raster {
+
+enum MsaaMode : uint32_t {
+ kNoMSAA,
+ kMSAA, // legacy
+ kDMSAA, // new and improved
+};
+
+} // namespace raster
+} // namespace gpu
+
+#endif
diff --git a/gpu/command_buffer/common/raster_cmd_format.h b/gpu/command_buffer/common/raster_cmd_format.h
index e43a51f..5af4902 100644
--- a/gpu/command_buffer/common/raster_cmd_format.h
+++ b/gpu/command_buffer/common/raster_cmd_format.h
@@ -19,6 +19,7 @@
#include "gpu/command_buffer/common/constants.h"
#include "gpu/command_buffer/common/gl2_types.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
+#include "gpu/command_buffer/common/raster_cmd_enums.h"
#include "gpu/command_buffer/common/raster_cmd_ids.h"
#include "ui/gfx/buffer_types.h"
diff --git a/gpu/command_buffer/common/raster_cmd_format_autogen.h b/gpu/command_buffer/common/raster_cmd_format_autogen.h
index 7d02570b..ef98b2b46 100644
--- a/gpu/command_buffer/common/raster_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/raster_cmd_format_autogen.h
@@ -391,12 +391,14 @@
void Init(GLuint _sk_color,
GLboolean _needs_clear,
GLuint _msaa_sample_count,
+ gpu::raster::MsaaMode _msaa_mode,
GLboolean _can_use_lcd_text,
const GLbyte* _mailbox) {
SetHeader();
sk_color = _sk_color;
needs_clear = _needs_clear;
msaa_sample_count = _msaa_sample_count;
+ msaa_mode = _msaa_mode;
can_use_lcd_text = _can_use_lcd_text;
memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
}
@@ -405,11 +407,12 @@
GLuint _sk_color,
GLboolean _needs_clear,
GLuint _msaa_sample_count,
+ gpu::raster::MsaaMode _msaa_mode,
GLboolean _can_use_lcd_text,
const GLbyte* _mailbox) {
static_cast<ValueType*>(cmd)->Init(_sk_color, _needs_clear,
- _msaa_sample_count, _can_use_lcd_text,
- _mailbox);
+ _msaa_sample_count, _msaa_mode,
+ _can_use_lcd_text, _mailbox);
const uint32_t size = ComputeSize();
return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
}
@@ -418,11 +421,12 @@
uint32_t sk_color;
uint32_t needs_clear;
uint32_t msaa_sample_count;
+ uint32_t msaa_mode;
uint32_t can_use_lcd_text;
};
-static_assert(sizeof(BeginRasterCHROMIUMImmediate) == 20,
- "size of BeginRasterCHROMIUMImmediate should be 20");
+static_assert(sizeof(BeginRasterCHROMIUMImmediate) == 24,
+ "size of BeginRasterCHROMIUMImmediate should be 24");
static_assert(offsetof(BeginRasterCHROMIUMImmediate, header) == 0,
"offset of BeginRasterCHROMIUMImmediate header should be 0");
static_assert(offsetof(BeginRasterCHROMIUMImmediate, sk_color) == 4,
@@ -432,9 +436,11 @@
static_assert(
offsetof(BeginRasterCHROMIUMImmediate, msaa_sample_count) == 12,
"offset of BeginRasterCHROMIUMImmediate msaa_sample_count should be 12");
+static_assert(offsetof(BeginRasterCHROMIUMImmediate, msaa_mode) == 16,
+ "offset of BeginRasterCHROMIUMImmediate msaa_mode should be 16");
static_assert(
- offsetof(BeginRasterCHROMIUMImmediate, can_use_lcd_text) == 16,
- "offset of BeginRasterCHROMIUMImmediate can_use_lcd_text should be 16");
+ offsetof(BeginRasterCHROMIUMImmediate, can_use_lcd_text) == 20,
+ "offset of BeginRasterCHROMIUMImmediate can_use_lcd_text should be 20");
struct RasterCHROMIUM {
typedef RasterCHROMIUM ValueType;
diff --git a/gpu/command_buffer/common/raster_cmd_format_test_autogen.h b/gpu/command_buffer/common/raster_cmd_format_test_autogen.h
index 628d09e..414cd09 100644
--- a/gpu/command_buffer/common/raster_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/raster_cmd_format_test_autogen.h
@@ -160,7 +160,8 @@
*GetBufferAs<cmds::BeginRasterCHROMIUMImmediate>();
void* next_cmd =
cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLboolean>(12),
- static_cast<GLuint>(13), static_cast<GLboolean>(14), data);
+ static_cast<GLuint>(13), static_cast<gpu::raster::MsaaMode>(14),
+ static_cast<GLboolean>(15), data);
EXPECT_EQ(static_cast<uint32_t>(cmds::BeginRasterCHROMIUMImmediate::kCmdId),
cmd.header.command);
EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
@@ -168,7 +169,8 @@
EXPECT_EQ(static_cast<GLuint>(11), cmd.sk_color);
EXPECT_EQ(static_cast<GLboolean>(12), cmd.needs_clear);
EXPECT_EQ(static_cast<GLuint>(13), cmd.msaa_sample_count);
- EXPECT_EQ(static_cast<GLboolean>(14), cmd.can_use_lcd_text);
+ EXPECT_EQ(static_cast<gpu::raster::MsaaMode>(14), cmd.msaa_mode);
+ EXPECT_EQ(static_cast<GLboolean>(15), cmd.can_use_lcd_text);
CheckBytesWrittenMatchesExpectedSize(
next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
}
diff --git a/gpu/command_buffer/raster_cmd_buffer_functions.txt b/gpu/command_buffer/raster_cmd_buffer_functions.txt
index 4281ce2..2051ebbd 100644
--- a/gpu/command_buffer/raster_cmd_buffer_functions.txt
+++ b/gpu/command_buffer/raster_cmd_buffer_functions.txt
@@ -23,7 +23,7 @@
GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void);
// Extension CHROMIUM_raster_transport
-GL_APICALL void GL_APIENTRY glBeginRasterCHROMIUM (GLuint sk_color, GLboolean needs_clear, GLuint msaa_sample_count, GLboolean can_use_lcd_text, const GLbyte* mailbox);
+GL_APICALL void GL_APIENTRY glBeginRasterCHROMIUM (GLuint sk_color, GLboolean needs_clear, GLuint msaa_sample_count, gpu::raster::MsaaMode msaa_mode, GLboolean can_use_lcd_text, const GLbyte* mailbox);
GL_APICALL void GL_APIENTRY glRasterCHROMIUM (GLuint raster_shm_id, GLuint raster_shm_offset, GLuint raster_shm_size, GLuint font_shm_id, GLuint font_shm_offset, GLuint font_shm_size);
GL_APICALL void GL_APIENTRY glEndRasterCHROMIUM (void);
GL_APICALL void GL_APIENTRY glCreateTransferCacheEntryINTERNAL (GLuint entry_type, GLuint entry_id, GLuint handle_shm_id, GLuint handle_shm_offset, GLuint data_shm_id, GLuint data_shm_offset, GLuint data_size);
diff --git a/gpu/command_buffer/service/raster_cmd_validation_autogen.h b/gpu/command_buffer/service/raster_cmd_validation_autogen.h
index 0ee7672f..0de3156 100644
--- a/gpu/command_buffer/service/raster_cmd_validation_autogen.h
+++ b/gpu/command_buffer/service/raster_cmd_validation_autogen.h
@@ -35,6 +35,12 @@
ValueValidator<GLenum> texture_parameter;
ValueValidator<GLenum> texture_wrap_mode;
ValueValidator<gfx::BufferUsage> gfx_buffer_usage;
+class GpuRasterMsaaModeValidator {
+ public:
+ bool IsValid(const gpu::raster::MsaaMode value) const;
+};
+GpuRasterMsaaModeValidator gpu_raster_msaa_mode;
+
ValueValidator<viz::ResourceFormat> viz_resource_format;
#endif // GPU_COMMAND_BUFFER_SERVICE_RASTER_CMD_VALIDATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h
index db3a13f8..4c34cae7 100644
--- a/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h
+++ b/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h
@@ -71,6 +71,17 @@
gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
};
+bool Validators::GpuRasterMsaaModeValidator::IsValid(
+ const gpu::raster::MsaaMode value) const {
+ switch (value) {
+ case gpu::raster::MsaaMode::kNoMSAA:
+ case gpu::raster::MsaaMode::kMSAA:
+ case gpu::raster::MsaaMode::kDMSAA:
+ return true;
+ }
+ return false;
+}
+
static const viz::ResourceFormat valid_viz_resource_format_table[] = {
viz::ResourceFormat::RGBA_8888, viz::ResourceFormat::RGBA_4444,
viz::ResourceFormat::BGRA_8888, viz::ResourceFormat::ALPHA_8,
diff --git a/gpu/command_buffer/service/raster_decoder.cc b/gpu/command_buffer/service/raster_decoder.cc
index 6814eb55..ccf30bb 100644
--- a/gpu/command_buffer/service/raster_decoder.cc
+++ b/gpu/command_buffer/service/raster_decoder.cc
@@ -743,6 +743,7 @@
void DoBeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const volatile GLbyte* key);
void DoRasterCHROMIUM(GLuint raster_shm_id,
@@ -872,6 +873,7 @@
bool supports_oop_raster_ = false;
bool use_passthrough_ = false;
bool use_ddl_ = false;
+ bool use_ddl_in_current_raster_session_ = false;
// The current decoder error communicates the decoder error through command
// processing functions that do not return the error value. Should be set
@@ -3327,6 +3329,7 @@
void RasterDecoderImpl::DoBeginRasterCHROMIUM(GLuint sk_color,
GLboolean needs_clear,
GLuint msaa_sample_count,
+ MsaaMode msaa_mode,
GLboolean can_use_lcd_text,
const volatile GLbyte* key) {
// Workaround for https://crbug.com/906453: Flush before BeginRaster (the
@@ -3373,21 +3376,41 @@
DCHECK(!raster_canvas_);
shared_context_state_->set_need_context_state_reset(true);
+ SkColorType sk_color_type = viz::ResourceFormatToClosestSkColorType(
+ /*gpu_compositing=*/true, shared_image_->format());
+
+ int final_msaa_count;
+ uint32_t flags;
+ switch (msaa_mode) {
+ default:
+ case kNoMSAA:
+ final_msaa_count = 0;
+ flags = 0;
+ use_ddl_in_current_raster_session_ = use_ddl_;
+ break;
+ case kMSAA:
+ // If we can't match requested MSAA samples, don't use MSAA.
+ final_msaa_count = std::max(static_cast<int>(msaa_sample_count), 0);
+ if (final_msaa_count >
+ gr_context()->maxSurfaceSampleCountForColorType(sk_color_type))
+ final_msaa_count = 0;
+ flags = 0;
+ use_ddl_in_current_raster_session_ = use_ddl_;
+ break;
+ case kDMSAA:
+ final_msaa_count = 1;
+ flags = SkSurfaceProps::kDynamicMSAA_Flag;
+ // DMSAA is not compatible with DDL
+ use_ddl_in_current_raster_session_ = false;
+ break;
+ }
+
// Use unknown pixel geometry to disable LCD text.
- uint32_t flags = 0;
SkSurfaceProps surface_props(flags, kUnknown_SkPixelGeometry);
if (can_use_lcd_text) {
surface_props = skia::LegacyDisplayGlobals::GetSkSurfaceProps(flags);
}
- SkColorType sk_color_type = viz::ResourceFormatToClosestSkColorType(
- /*gpu_compositing=*/true, shared_image_->format());
- // If we can't match requested MSAA samples, don't use MSAA.
- int final_msaa_count = std::max(static_cast<int>(msaa_sample_count), 0);
- if (final_msaa_count >
- gr_context()->maxSurfaceSampleCountForColorType(sk_color_type))
- final_msaa_count = 0;
-
std::vector<GrBackendSemaphore> begin_semaphores;
DCHECK(end_semaphores_.empty());
DCHECK(!scoped_shared_image_write_);
@@ -3412,7 +3435,7 @@
DCHECK(result);
}
- if (use_ddl_) {
+ if (use_ddl_in_current_raster_session_) {
SkSurfaceCharacterization characterization;
bool result = sk_surface_->characterize(&characterization);
DCHECK(result) << "Failed to characterize raster SkSurface.";
@@ -3532,7 +3555,7 @@
}
bool RasterDecoderImpl::EnsureDDLReadyForRaster() {
- DCHECK(use_ddl_);
+ DCHECK(use_ddl_in_current_raster_session_);
DCHECK_EQ(current_decoder_error_, error::kNoError);
if (!ddl_) {
@@ -3569,7 +3592,7 @@
shared_context_state_->set_need_context_state_reset(true);
raster_canvas_ = nullptr;
- if (use_ddl_) {
+ if (use_ddl_in_current_raster_session_) {
if (!EnsureDDLReadyForRaster()) {
// This decoder error indicates that this command has not finished
// executing. The decoder will yield and re-execute this command when it
diff --git a/gpu/command_buffer/service/raster_decoder_autogen.h b/gpu/command_buffer/service/raster_decoder_autogen.h
index 55b562b..610a1dc 100644
--- a/gpu/command_buffer/service/raster_decoder_autogen.h
+++ b/gpu/command_buffer/service/raster_decoder_autogen.h
@@ -114,6 +114,8 @@
GLuint sk_color = static_cast<GLuint>(c.sk_color);
GLboolean needs_clear = static_cast<GLboolean>(c.needs_clear);
GLuint msaa_sample_count = static_cast<GLuint>(c.msaa_sample_count);
+ gpu::raster::MsaaMode msaa_mode =
+ static_cast<gpu::raster::MsaaMode>(c.msaa_mode);
GLboolean can_use_lcd_text = static_cast<GLboolean>(c.can_use_lcd_text);
uint32_t mailbox_size;
if (!gles2::GLES2Util::ComputeDataSize<GLbyte, 16>(1, &mailbox_size)) {
@@ -128,7 +130,7 @@
if (mailbox == nullptr) {
return error::kOutOfBounds;
}
- DoBeginRasterCHROMIUM(sk_color, needs_clear, msaa_sample_count,
+ DoBeginRasterCHROMIUM(sk_color, needs_clear, msaa_sample_count, msaa_mode,
can_use_lcd_text, mailbox);
return error::kNoError;
}
diff --git a/gpu/ipc/client/raster_in_process_context_tests.cc b/gpu/ipc/client/raster_in_process_context_tests.cc
index d8ad7b20..eb60e38 100644
--- a/gpu/ipc/client/raster_in_process_context_tests.cc
+++ b/gpu/ipc/client/raster_in_process_context_tests.cc
@@ -107,7 +107,8 @@
// Call BeginRasterCHROMIUM.
ri_->BeginRasterCHROMIUM(
/*sk_color=*/0, /*needs_clear=*/true, /*msaa_sample_count=*/0,
- /*can_use_lcd_text=*/false, color_space, mailbox.name);
+ gpu::raster::kNoMSAA, /*can_use_lcd_text=*/false, color_space,
+ mailbox.name);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), ri_->GetError());
// Should flag an error this command is not allowed between a Begin and
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
index 493a1e4..a38d76b 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -1420,9 +1420,9 @@
gfx::Vector2dF post_scale(1.f, 1.f);
ri->BeginRasterCHROMIUM(
- background_color, needs_clear, /*msaa_sample_count=*/0,
- ColorParams().CanUseLcdText(), ColorParams().GetStorageGfxColorSpace(),
- mailbox.name);
+ background_color, needs_clear, /*msaa_sample_count=*/1,
+ gpu::raster::MsaaMode::kDMSAA, ColorParams().CanUseLcdText(),
+ ColorParams().GetStorageGfxColorSpace(), mailbox.name);
ri->RasterCHROMIUM(list.get(), GetOrCreateCanvasImageProvider(), size,
full_raster_rect, playback_rect, post_translate,
diff --git a/third_party/blink/web_tests/SlowTests b/third_party/blink/web_tests/SlowTests
index e751967..ed6b928 100644
--- a/third_party/blink/web_tests/SlowTests
+++ b/third_party/blink/web_tests/SlowTests
@@ -169,6 +169,7 @@
crbug.com/726075 [ Mac ] virtual/gpu/fast/canvas/canvas-composite-shadow.html [ Slow ]
# Slow oopr canvas tests
+crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-composite.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-composite-alpha.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-composite-shadow.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow.html [ Slow ]
@@ -178,11 +179,13 @@
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-gradient-over-color.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-clipping.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-image-over-color.html [ Slow ]
+crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-image-over-gradient.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-pattern-over-color.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-pattern-over-pattern.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-text.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-gradient-over-pattern.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blending-transforms.html [ Slow ]
+crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/color-space/canvas-createImageBitmap-rec2020.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/fillrect_gradient.html [ Slow ]
crbug.com/1081534 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-blend-solid.html [ Slow ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations
index 4dad0e8..bb6d437 100644
--- a/third_party/blink/web_tests/TestExpectations
+++ b/third_party/blink/web_tests/TestExpectations
@@ -1964,6 +1964,10 @@
# Temporarily disabled until document marker serialization is enabled for AXInlineTextBox
crbug.com/1227485 accessibility/spelling-markers.html [ Failure ]
+# Bugs caused by enabling DMSAA on OOPR-Canvas
+crbug.com/1229463 [ Mac ] virtual/oopr-canvas2d/fast/canvas/canvas-largedraws.html [ Crash ]
+crbug.com/1229486 virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint.html [ Failure ]
+
# Temporarily disabled after chromium change
crbug.com/492511 [ Mac ] virtual/text-antialias/atsui-negative-spacing-features.html [ Failure ]
crbug.com/492511 [ Mac ] virtual/text-antialias/international/arabic-justify.html [ Failure ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites
index 0c11e9f..36e55bc 100644
--- a/third_party/blink/web_tests/VirtualTestSuites
+++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -57,7 +57,8 @@
"--enable-blink-features=OffMainThreadCSSPaint",
"--enable-gpu-rasterization",
"--enable-oop-rasterization",
- "--enable-accelerated-2d-canvas"]
+ "--enable-accelerated-2d-canvas",
+ "--disable-features=CanvasOopRasterization"]
},
{
"prefix": "prefer_compositing_to_lcd_text",
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
index 270dc39..a13e423 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
index 335f2e5..0b430d5 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
index eff4d3d..fe22291a 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
index be4bcf26..d29ea06 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
index ddebd76..7608142 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
index d03b89a..04e0c67 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
index 5e7f875..4c9a3d9 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
index 4c5892c..5d67f3f 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
similarity index 100%
rename from third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
rename to third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
new file mode 100644
index 0000000..dbf2396
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
new file mode 100644
index 0000000..f617ebb7
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
index 47b0fb2..2b701f0 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
new file mode 100644
index 0000000..158a3c5
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
index b03258f..a16ba98 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
index 81e5ecf..f3fccb8 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
new file mode 100644
index 0000000..07466c2
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
index aa2913ba..951754e 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
new file mode 100644
index 0000000..5166bb7
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
index 0a5b340..265b08d6 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
index 2806748..56d5482 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
index bc1f13b..809e71b 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
index d487eae..6774bff 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
similarity index 72%
rename from third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
rename to third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
index b84e40c640..acccb15 100644
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
index 9f680a3..bb57243 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
index e6c26c6..33b9999 100644
--- a/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
+++ b/third_party/blink/web_tests/platform/mac/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
new file mode 100644
index 0000000..2887729
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
new file mode 100644
index 0000000..ed717978
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
index 2a511e4..646c7114 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
new file mode 100644
index 0000000..3abfa8b0
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-transformclip-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
index e68ec73e..7d2cdbc 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
index 3fcb4484..c94ec19 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
new file mode 100644
index 0000000..b9230f3
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
new file mode 100644
index 0000000..16770eb
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
new file mode 100644
index 0000000..6c7e6a6
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
index f01b876..84951e3 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
index a67f5de..6ae50423 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-incremental-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
new file mode 100644
index 0000000..8409a99
--- /dev/null
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
index 4ed3d43e..5c7fbd06 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-shadow-source-in-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
index 2c21971..5a45f3a 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-text-baseline-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
similarity index 69%
copy from third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
copy to third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
index b84e40c640..1d9f07c3 100644
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/canvas-zero-length-lineCap-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
index 95b8657..5489791 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/image-object-in-canvas-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
index c1f645d..6e56be9 100644
--- a/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
+++ b/third_party/blink/web_tests/platform/win/virtual/oopr-canvas2d/fast/canvas/quadraticCurveTo-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
deleted file mode 100644
index 8bc6a29..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
deleted file mode 100644
index 5b5c255..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-arc-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-drawImage-antiAlias-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-drawImage-antiAlias-expected.png
index ef8933d..7c511f5 100644
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-drawImage-antiAlias-expected.png
+++ b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-drawImage-antiAlias-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
deleted file mode 100644
index 2b5c0b0..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
deleted file mode 100644
index 0e9fc25..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-circumference-fill-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
deleted file mode 100644
index 814152a..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-ellipse-connecting-line-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
deleted file mode 100644
index 2ac683c..0000000
--- a/third_party/blink/web_tests/virtual/oopr-canvas2d/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png
+++ /dev/null
Binary files differ