Fix build break
[chromium-blink-merge.git] / cc / test / fake_scrollbar_theme_painter.cc
blobb93cb2a11524a3d7bbe6b3a8b77209965c265123
1 // Copyright 2012 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/test/fake_scrollbar_theme_painter.h"
6 #include "third_party/skia/include/core/SkCanvas.h"
7 #include "ui/gfx/rect.h"
9 namespace cc {
11 void FakeScrollbarThemePainter::PaintScrollbarBackground(
12 SkCanvas* canvas, gfx::Rect rect) {
13 Paint(canvas, rect);
16 void FakeScrollbarThemePainter::PaintTrackBackground(
17 SkCanvas* canvas, gfx::Rect rect) {
18 Paint(canvas, rect);
21 void FakeScrollbarThemePainter::PaintBackTrackPart(
22 SkCanvas* canvas, gfx::Rect rect) {
23 Paint(canvas, rect);
26 void FakeScrollbarThemePainter::PaintForwardTrackPart(
27 SkCanvas* canvas, gfx::Rect rect) {
28 Paint(canvas, rect);
31 void FakeScrollbarThemePainter::PaintBackButtonStart(
32 SkCanvas* canvas, gfx::Rect rect) {
33 Paint(canvas, rect);
36 void FakeScrollbarThemePainter::PaintBackButtonEnd(
37 SkCanvas* canvas, gfx::Rect rect) {
38 Paint(canvas, rect);
41 void FakeScrollbarThemePainter::PaintForwardButtonStart(
42 SkCanvas* canvas, gfx::Rect rect) {
43 Paint(canvas, rect);
46 void FakeScrollbarThemePainter::PaintForwardButtonEnd(
47 SkCanvas* canvas, gfx::Rect rect) {
48 Paint(canvas, rect);
51 void FakeScrollbarThemePainter::PaintTickmarks(
52 SkCanvas* canvas, gfx::Rect rect) {
53 Paint(canvas, rect);
56 void FakeScrollbarThemePainter::PaintThumb(
57 SkCanvas* canvas, gfx::Rect rect) {
58 Paint(canvas, rect);
61 void FakeScrollbarThemePainter::Paint(SkCanvas* canvas, gfx::Rect rect) {
62 if (!paint_)
63 return;
64 // Fill the scrollbar with a different color each time.
65 ++fill_color_;
66 canvas->clear(SK_ColorBLACK | fill_color_);
69 } // namespace cc