Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / cc / input / pinch_zoom_scrollbar_painter.cc
blob1034e259bc7c5b93d5eccf7b3d7ca7aa9865c2c6
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
3 // found in the LICENSE file.
5 #include "cc/input/pinch_zoom_scrollbar_painter.h"
7 #include "third_party/skia/include/core/SkCanvas.h"
8 #include "ui/gfx/rect.h"
10 namespace cc {
12 PinchZoomScrollbarPainter::~PinchZoomScrollbarPainter() {}
14 void PinchZoomScrollbarPainter::PaintScrollbarBackground(
15 SkCanvas* canvas,
16 gfx::Rect rect) {
19 void PinchZoomScrollbarPainter::PaintTrackBackground(
20 SkCanvas* canvas,
21 gfx::Rect rect) {
24 void PinchZoomScrollbarPainter::PaintBackTrackPart(
25 SkCanvas* canvas,
26 gfx::Rect rect) {
29 void PinchZoomScrollbarPainter::PaintForwardTrackPart(
30 SkCanvas* canvas,
31 gfx::Rect rect) {
34 void PinchZoomScrollbarPainter::PaintBackButtonStart(
35 SkCanvas* canvas,
36 gfx::Rect rect) {
39 void PinchZoomScrollbarPainter::PaintBackButtonEnd(
40 SkCanvas* canvas,
41 gfx::Rect rect) {
44 void PinchZoomScrollbarPainter::PaintForwardButtonStart(
45 SkCanvas* canvas,
46 gfx::Rect rect) {
49 void PinchZoomScrollbarPainter::PaintForwardButtonEnd(
50 SkCanvas* canvas,
51 gfx::Rect rect) {
54 void PinchZoomScrollbarPainter::PaintTickmarks(
55 SkCanvas* canvas,
56 gfx::Rect rect) {
59 void PinchZoomScrollbarPainter::PaintThumb(
60 SkCanvas* canvas,
61 gfx::Rect thumb_rect) {
62 canvas->clear(SkColorSetARGB(0, 0, 0, 0));
63 SkPaint paint;
65 // TODO(wjmaclean): currently the pinch-zoom overlay scrollbars are
66 // drawn as grey, but need to check this with UX design.
67 paint.setColor(SkColorSetARGB(128, 32, 32, 32));
68 SkScalar border = 2;
69 SkScalar corner_radius = 2;
70 SkRect rect = SkRect::MakeXYWH(border, border,
71 thumb_rect.width() - 2 * border,
72 thumb_rect.height() - 2 * border);
73 canvas->drawRoundRect(rect, corner_radius, corner_radius, paint);
76 } // namespace cc