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

Unified Diff: services/ui/ws/frame_generator.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase 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
« no previous file with comments | « services/ui/demo/bitmap_uploader.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index add70fc3e5d92e25f96b0351eed9f62a01ea8be1..77b9b35bd4a93fd89a8fba68ee0113dd4f0d247b 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -164,7 +164,7 @@ cc::CompositorFrame FrameGenerator::GenerateCompositorFrame(
cc::SharedQuadState* shared_state =
invert_pass->CreateAndAppendSharedQuadState();
shared_state->SetAll(gfx::Transform(), output_rect.size(), output_rect,
- output_rect, false, 1.f, SkXfermode::kSrcOver_Mode, 0);
+ output_rect, false, 1.f, SkBlendMode::kSrcOver, 0);
auto* quad = invert_pass->CreateAndAppendDrawQuad<cc::RenderPassDrawQuad>();
cc::FilterOperations filters;
filters.Append(cc::FilterOperation::CreateInvertFilter(1.f));
@@ -221,12 +221,11 @@ void FrameGenerator::DrawWindowTree(
const gfx::Rect bounds_at_origin(window->bounds().size());
// TODO(fsamuel): These clipping and visible rects are incorrect. They need
// to be populated from CompositorFrame structs.
- sqs->SetAll(quad_to_target_transform,
- bounds_at_origin.size() /* layer_bounds */,
- bounds_at_origin /* visible_layer_bounds */,
- bounds_at_origin /* clip_rect */, false /* is_clipped */,
- combined_opacity, SkXfermode::kSrcOver_Mode,
- 0 /* sorting-context_id */);
+ sqs->SetAll(
+ quad_to_target_transform, bounds_at_origin.size() /* layer_bounds */,
+ bounds_at_origin /* visible_layer_bounds */,
+ bounds_at_origin /* clip_rect */, false /* is_clipped */,
+ combined_opacity, SkBlendMode::kSrcOver, 0 /* sorting-context_id */);
auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
quad->SetAll(sqs, bounds_at_origin /* rect */,
gfx::Rect() /* opaque_rect */,
@@ -243,12 +242,11 @@ void FrameGenerator::DrawWindowTree(
const gfx::Rect bounds_at_origin(
window->compositor_frame_sink_manager()->GetLatestFrameSize(
mojom::CompositorFrameSinkType::UNDERLAY));
- sqs->SetAll(quad_to_target_transform,
- bounds_at_origin.size() /* layer_bounds */,
- bounds_at_origin /* visible_layer_bounds */,
- bounds_at_origin /* clip_rect */, false /* is_clipped */,
- combined_opacity, SkXfermode::kSrcOver_Mode,
- 0 /* sorting-context_id */);
+ sqs->SetAll(
+ quad_to_target_transform, bounds_at_origin.size() /* layer_bounds */,
+ bounds_at_origin /* visible_layer_bounds */,
+ bounds_at_origin /* clip_rect */, false /* is_clipped */,
+ combined_opacity, SkBlendMode::kSrcOver, 0 /* sorting-context_id */);
auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
quad->SetAll(sqs, bounds_at_origin /* rect */,
« no previous file with comments | « services/ui/demo/bitmap_uploader.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698