summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_scrollbar.h
diff options
context:
space:
mode:
authorbokan@chromium.org <bokan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 16:04:19 +0000
committerbokan@chromium.org <bokan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 16:04:19 +0000
commit5dbdf37eb6e067f65e9831a97c8a9dd5218c5a12 (patch)
tree99386d3277a4152210b6eab1f7dc2df71aebe007 /cc/test/fake_scrollbar.h
parenta30be86ee3fe417808e8257301d4dbfcfc57127d (diff)
downloadchromium_src-5dbdf37eb6e067f65e9831a97c8a9dd5218c5a12.zip
chromium_src-5dbdf37eb6e067f65e9831a97c8a9dd5218c5a12.tar.gz
chromium_src-5dbdf37eb6e067f65e9831a97c8a9dd5218c5a12.tar.bz2
Fixed rounding issue on scrollbar rasterization.
Changed the painting method to translate the canvas back to the origin before performing the scale to prevent losing pixels due to rounding. Also made the it take the layer-space rect as a parameter, instead of trying to reconstruct it from the (possibly-clamped) content-rect, and calculate the layer-space to content-space scaling factor directly from rects. BUG=336534 Review URL: https://codereview.chromium.org/150603004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_scrollbar.h')
-rw-r--r--cc/test/fake_scrollbar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/test/fake_scrollbar.h b/cc/test/fake_scrollbar.h
index 41152f6..d6311ed 100644
--- a/cc/test/fake_scrollbar.h
+++ b/cc/test/fake_scrollbar.h
@@ -36,6 +36,7 @@ class FakeScrollbar : public Scrollbar {
thumb_thickness_ = thumb_thickness;
}
void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; }
+ SkColor paint_fill_color() const { return SK_ColorBLACK | fill_color_; }
private:
bool paint_;