Index: cc/test/fake_scrollbar.cc |
diff --git a/cc/test/fake_scrollbar.cc b/cc/test/fake_scrollbar.cc |
index 7285660f17016fc5be6e56070a40a817d7dfe0e2..f500a2a2861e99b17f2c832f1f89db7cd7af2a41 100644 |
--- a/cc/test/fake_scrollbar.cc |
+++ b/cc/test/fake_scrollbar.cc |
@@ -5,6 +5,7 @@ |
#include "cc/test/fake_scrollbar.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
+#include "ui/gfx/skia_util.h" |
namespace cc { |
@@ -62,7 +63,16 @@ void FakeScrollbar::PaintPart(SkCanvas* canvas, |
// Fill the scrollbar with a different color each time. |
fill_color_++; |
- canvas->clear(SK_ColorBLACK | fill_color_); |
+ |
+ if (part == TRACK) { |
+ SkPaint paint; |
+ paint.setAntiAlias(false); |
+ paint.setColor(get_color()); |
+ paint.setStyle(SkPaint::kFill_Style); |
+ canvas->drawRect(RectToSkRect(TrackRect()), paint); |
danakj
2014/02/18 20:43:30
Hm.. why isn't this able to just paint the |conten
bokan
2014/02/18 21:48:15
The real ScrollbarImpl's PaintPart method only use
|
+ } else { |
+ canvas->clear(get_color()); |
+ } |
} |
} // namespace cc |