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

Side by Side Diff: ui/aura/test/test_window_delegate.cc

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/test/test_window_delegate.h" 5 #include "ui/aura/test/test_window_delegate.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/base/hit_test.h" 9 #include "ui/base/hit_test.h"
10 #include "ui/compositor/paint_recorder.h" 10 #include "ui/compositor/paint_recorder.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 last_key_code_ = event->key_code(); 117 last_key_code_ = event->key_code();
118 event->SetHandled(); 118 event->SetHandled();
119 } 119 }
120 120
121 void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) { 121 void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) {
122 delete this; 122 delete this;
123 } 123 }
124 124
125 void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) { 125 void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) {
126 ui::PaintRecorder recorder(context, window_size_); 126 ui::PaintRecorder recorder(context, window_size_);
127 recorder.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode); 127 recorder.canvas()->DrawColor(color_, SkBlendMode::kSrc);
128 } 128 }
129 129
130 //////////////////////////////////////////////////////////////////////////////// 130 ////////////////////////////////////////////////////////////////////////////////
131 // MaskedWindowDelegate 131 // MaskedWindowDelegate
132 132
133 MaskedWindowDelegate::MaskedWindowDelegate(const gfx::Rect mask_rect) 133 MaskedWindowDelegate::MaskedWindowDelegate(const gfx::Rect mask_rect)
134 : mask_rect_(mask_rect) { 134 : mask_rect_(mask_rect) {
135 } 135 }
136 136
137 bool MaskedWindowDelegate::HasHitTestMask() const { 137 bool MaskedWindowDelegate::HasHitTestMask() const {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 int EventCountDelegate::GetGestureCountAndReset() { 227 int EventCountDelegate::GetGestureCountAndReset() {
228 int gesture_count = gesture_count_; 228 int gesture_count = gesture_count_;
229 gesture_count_ = 0; 229 gesture_count_ = 0;
230 return gesture_count; 230 return gesture_count;
231 } 231 }
232 232
233 } // namespace test 233 } // namespace test
234 } // namespace aura 234 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698