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

Side by Side Diff: ash/utility/screenshot_controller.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/utility/screenshot_controller.h" 5 #include "ash/utility/screenshot_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/display/mouse_cursor_event_filter.h" 9 #include "ash/display/mouse_cursor_event_filter.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ui::PaintRecorder recorder(context, layer()->size()); 130 ui::PaintRecorder recorder(context, layer()->size());
131 131
132 if (draw_inactive_overlay_) { 132 if (draw_inactive_overlay_) {
133 recorder.canvas()->FillRect(gfx::Rect(layer()->size()), 133 recorder.canvas()->FillRect(gfx::Rect(layer()->size()),
134 kSelectedAreaOverlayColor); 134 kSelectedAreaOverlayColor);
135 } 135 }
136 136
137 DrawPseudoCursor(recorder.canvas()); 137 DrawPseudoCursor(recorder.canvas());
138 138
139 if (!region_.IsEmpty()) 139 if (!region_.IsEmpty())
140 recorder.canvas()->FillRect(region_, SK_ColorBLACK, 140 recorder.canvas()->FillRect(region_, SK_ColorBLACK, SkBlendMode::kClear);
141 SkXfermode::kClear_Mode);
142 } 141 }
143 142
144 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {} 143 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {}
145 144
146 void OnDeviceScaleFactorChanged(float device_scale_factor) override {} 145 void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
147 146
148 // Mouse cursor may move sub DIP, so paint pseudo cursor instead of 147 // Mouse cursor may move sub DIP, so paint pseudo cursor instead of
149 // using platform cursor so that it's aliend with the region. 148 // using platform cursor so that it's aliend with the region.
150 void DrawPseudoCursor(gfx::Canvas* canvas) { 149 void DrawPseudoCursor(gfx::Canvas* canvas) {
151 // Don't draw if window selection mode. 150 // Don't draw if window selection mode.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 545
547 void ScreenshotController::OnDisplayMetricsChanged( 546 void ScreenshotController::OnDisplayMetricsChanged(
548 const display::Display& display, 547 const display::Display& display,
549 uint32_t changed_metrics) {} 548 uint32_t changed_metrics) {}
550 549
551 void ScreenshotController::OnWindowDestroying(aura::Window* window) { 550 void ScreenshotController::OnWindowDestroying(aura::Window* window) {
552 SetSelectedWindow(nullptr); 551 SetSelectedWindow(nullptr);
553 } 552 }
554 553
555 } // namespace ash 554 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/frame/custom_frame_view_mus.cc ('k') | cc/blimp/layer_tree_host_unittest_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698