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

Side by Side Diff: ash/touch/touch_hud_debug.cc

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: fix comments Created 3 years, 10 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/touch/touch_hud_debug.h" 5 #include "ash/touch/touch_hud_debug.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 std::map<int, int> touch_id_to_trace_index_; 231 std::map<int, int> touch_id_to_trace_index_;
232 232
233 DISALLOW_COPY_AND_ASSIGN(TouchLog); 233 DISALLOW_COPY_AND_ASSIGN(TouchLog);
234 }; 234 };
235 235
236 // TouchHudCanvas draws touch traces in |FULLSCREEN| and |REDUCED_SCALE| modes. 236 // TouchHudCanvas draws touch traces in |FULLSCREEN| and |REDUCED_SCALE| modes.
237 class TouchHudCanvas : public views::View { 237 class TouchHudCanvas : public views::View {
238 public: 238 public:
239 explicit TouchHudCanvas(const TouchLog& touch_log) 239 explicit TouchHudCanvas(const TouchLog& touch_log)
240 : touch_log_(touch_log), scale_(1) { 240 : touch_log_(touch_log), scale_(1) {
241 SetPaintToLayer(true); 241 SetPaintToLayer();
242 layer()->SetFillsBoundsOpaquely(false); 242 layer()->SetFillsBoundsOpaquely(false);
243 243
244 paint_.setStyle(SkPaint::kFill_Style); 244 paint_.setStyle(SkPaint::kFill_Style);
245 } 245 }
246 246
247 ~TouchHudCanvas() override {} 247 ~TouchHudCanvas() override {}
248 248
249 void SetScale(int scale) { 249 void SetScale(int scale) {
250 if (scale_ == scale) 250 if (scale_ == scale)
251 return; 251 return;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 RootWindowController* controller) { 463 RootWindowController* controller) {
464 controller->set_touch_hud_debug(this); 464 controller->set_touch_hud_debug(this);
465 } 465 }
466 466
467 void TouchHudDebug::UnsetHudForRootWindowController( 467 void TouchHudDebug::UnsetHudForRootWindowController(
468 RootWindowController* controller) { 468 RootWindowController* controller) {
469 controller->set_touch_hud_debug(NULL); 469 controller->set_touch_hud_debug(NULL);
470 } 470 }
471 471
472 } // namespace ash 472 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698