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

Side by Side Diff: chrome/browser/chromeos/display/overscan_calibrator.cc

Issue 1477433005: Remove kuint8max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint4
Patch Set: rebase Created 5 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
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 "chrome/browser/chromeos/display/overscan_calibrator.h" 5 #include "chrome/browser/chromeos/display/overscan_calibrator.h"
6 6
7 #include <stdint.h>
8
9 #include <limits>
10
7 #include "ash/display/display_info.h" 11 #include "ash/display/display_info.h"
8 #include "ash/display/display_manager.h" 12 #include "ash/display/display_manager.h"
9 #include "ash/display/window_tree_host_manager.h" 13 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/shell.h" 14 #include "ash/shell.h"
11 #include "ash/shell_window_ids.h" 15 #include "ash/shell_window_ids.h"
12 #include "base/callback.h" 16 #include "base/callback.h"
13 #include "third_party/skia/include/core/SkColor.h" 17 #include "third_party/skia/include/core/SkColor.h"
14 #include "third_party/skia/include/core/SkPaint.h" 18 #include "third_party/skia/include/core/SkPaint.h"
15 #include "third_party/skia/include/core/SkPath.h" 19 #include "third_party/skia/include/core/SkPath.h"
16 #include "ui/aura/window.h" 20 #include "ui/aura/window.h"
(...skipping 14 matching lines...) Expand all
31 const int kArrowGapWidth = 20; 35 const int kArrowGapWidth = 20;
32 36
33 // Draw the arrow for the overscan calibration to |canvas|. 37 // Draw the arrow for the overscan calibration to |canvas|.
34 void DrawTriangle(int x_offset, 38 void DrawTriangle(int x_offset,
35 int y_offset, 39 int y_offset,
36 double rotation_degree, 40 double rotation_degree,
37 gfx::Canvas* canvas) { 41 gfx::Canvas* canvas) {
38 // Draw triangular arrows. 42 // Draw triangular arrows.
39 SkPaint content_paint; 43 SkPaint content_paint;
40 content_paint.setStyle(SkPaint::kFill_Style); 44 content_paint.setStyle(SkPaint::kFill_Style);
41 content_paint.setColor(SkColorSetA(SK_ColorBLACK, kuint8max * kArrowOpacity)); 45 content_paint.setColor(SkColorSetA(
46 SK_ColorBLACK, std::numeric_limits<uint8_t>::max() * kArrowOpacity));
42 SkPaint border_paint; 47 SkPaint border_paint;
43 border_paint.setStyle(SkPaint::kStroke_Style); 48 border_paint.setStyle(SkPaint::kStroke_Style);
44 border_paint.setColor(SkColorSetA(SK_ColorWHITE, kuint8max * kArrowOpacity)); 49 border_paint.setColor(SkColorSetA(
50 SK_ColorWHITE, std::numeric_limits<uint8_t>::max() * kArrowOpacity));
45 51
46 SkPath base_path; 52 SkPath base_path;
47 base_path.moveTo(0, SkIntToScalar(-kCalibrationArrowHeight)); 53 base_path.moveTo(0, SkIntToScalar(-kCalibrationArrowHeight));
48 base_path.lineTo(SkIntToScalar(-kCalibrationArrowHeight), 0); 54 base_path.lineTo(SkIntToScalar(-kCalibrationArrowHeight), 0);
49 base_path.lineTo(SkIntToScalar(kCalibrationArrowHeight), 0); 55 base_path.lineTo(SkIntToScalar(kCalibrationArrowHeight), 0);
50 base_path.close(); 56 base_path.close();
51 57
52 SkPath path; 58 SkPath path;
53 gfx::Transform rotate_transform; 59 gfx::Transform rotate_transform;
54 rotate_transform.Rotate(rotation_degree); 60 rotate_transform.Rotate(rotation_degree);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 float device_scale_factor) { 155 float device_scale_factor) {
150 // TODO(mukai): Cancel the overscan calibration when the device 156 // TODO(mukai): Cancel the overscan calibration when the device
151 // configuration has changed. 157 // configuration has changed.
152 } 158 }
153 159
154 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() { 160 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() {
155 return base::Closure(); 161 return base::Closure();
156 } 162 }
157 163
158 } // namespace chromeos 164 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698