From 251699bdcff5063ceafe1442072f756085e2643b Mon Sep 17 00:00:00 2001 From: "aelias@chromium.org" Date: Wed, 9 Oct 2013 00:21:26 +0000 Subject: Make Android WebView filtering depend on scrolling status. This patch makes bilinear filtering of software images enabled only when there is no scrolling or CSS animation active, which matches the policy of classic WebView. In the long run, we'll likely want to support software tiling to avoid this kind of hack, but for now this maintains bugwards compatibility. Most of this patch is to solve the problem that CC was not aware whether or not WebView-handled fling is active. I added a new getter ScrollOffsetDelegate::IsExternalFlingActive for this. This also enables prefer-smoothness mode for these flings. New test RendererPixelTest.PictureDrawQuadDisableImageFiltering NOTRY=true BUG= internal b/10706494 Review URL: https://codereview.chromium.org/25233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227629 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/fake_content_layer_client.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'cc/test/fake_content_layer_client.h') diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h index ff42855..6afa5b6 100644 --- a/cc/test/fake_content_layer_client.h +++ b/cc/test/fake_content_layer_client.h @@ -18,6 +18,12 @@ namespace cc { class FakeContentLayerClient : public cc::ContentLayerClient { public: + struct BitmapData { + SkBitmap bitmap; + gfx::Point point; + SkPaint paint; + }; + FakeContentLayerClient(); virtual ~FakeContentLayerClient(); @@ -32,13 +38,19 @@ class FakeContentLayerClient : public cc::ContentLayerClient { draw_rects_.push_back(std::make_pair(rect, paint)); } - void add_draw_bitmap(const SkBitmap& bitmap, gfx::Point point) { - draw_bitmaps_.push_back(std::make_pair(bitmap, point)); + void add_draw_bitmap(const SkBitmap& bitmap, + gfx::Point point, + const SkPaint& paint) { + BitmapData data; + data.bitmap = bitmap; + data.point = point; + data.paint = paint; + draw_bitmaps_.push_back(data); } private: typedef std::vector > RectPaintVector; - typedef std::vector > BitmapVector; + typedef std::vector BitmapVector; bool paint_all_opaque_; RectPaintVector draw_rects_; -- cgit v1.1