summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-16 00:31:41 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-16 00:31:41 +0000
commit00b9838b129511ed29680f001a33cc7858179397 (patch)
treeeb367ce86342c77795c239d0a0a70526a951dbe7 /cc/test
parente859d06015371958d9015f9b2e26e38c76d76614 (diff)
downloadchromium_src-00b9838b129511ed29680f001a33cc7858179397.zip
chromium_src-00b9838b129511ed29680f001a33cc7858179397.tar.gz
chromium_src-00b9838b129511ed29680f001a33cc7858179397.tar.bz2
cc: Add remaining pixel tests for background blur.
This replicates the following layout tests with compositor pixel tests: platform/chromium/compositing/filters/background-filter-blur-outsets.html platform/chromium/compositing/filters/background-filter-blur-off-axis.html The first test verifies that pixels from outside the bounds of the layer with background blur are used to contribute to the background behind the blurred layer. The second test verifies that the blur layer's transform does not affect the rendering of the blurred content behind it. New test: LayerTreeHostFiltersPixelTest.BackgroundFilterBlurOutsets LayerTreeHostFiltersPixelTest.BackgroundFilterBlurOffAxis R=jamesr,enne BUG=191170 Depends on: https://codereview.chromium.org/12518026/ Review URL: https://codereview.chromium.org/12571010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/layer_tree_pixel_test.cc28
-rw-r--r--cc/test/layer_tree_pixel_test.h5
2 files changed, 33 insertions, 0 deletions
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index 87cbd8f..d4b3701 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -90,6 +90,34 @@ scoped_refptr<SolidColorLayer> LayerTreePixelTest::CreateSolidColorLayer(
return layer;
}
+scoped_refptr<SolidColorLayer> LayerTreePixelTest::
+ CreateSolidColorLayerWithBorder(
+ gfx::Rect rect, SkColor color, int border_width, SkColor border_color) {
+ scoped_refptr<SolidColorLayer> layer = CreateSolidColorLayer(rect, color);
+ scoped_refptr<SolidColorLayer> border_top = CreateSolidColorLayer(
+ gfx::Rect(0, 0, rect.width(), border_width), border_color);
+ scoped_refptr<SolidColorLayer> border_left = CreateSolidColorLayer(
+ gfx::Rect(0,
+ border_width,
+ border_width,
+ rect.height() - border_width * 2),
+ border_color);
+ scoped_refptr<SolidColorLayer> border_right = CreateSolidColorLayer(
+ gfx::Rect(rect.width() - border_width,
+ border_width,
+ border_width,
+ rect.height() - border_width * 2),
+ border_color);
+ scoped_refptr<SolidColorLayer> border_bottom = CreateSolidColorLayer(
+ gfx::Rect(0, rect.height() - border_width, rect.width(), border_width),
+ border_color);
+ layer->AddChild(border_top);
+ layer->AddChild(border_left);
+ layer->AddChild(border_right);
+ layer->AddChild(border_bottom);
+ return layer;
+}
+
void LayerTreePixelTest::RunPixelTest(
scoped_refptr<Layer> content_root,
base::FilePath file_name)
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h
index 4682d9e..58ec11f 100644
--- a/cc/test/layer_tree_pixel_test.h
+++ b/cc/test/layer_tree_pixel_test.h
@@ -34,6 +34,11 @@ class LayerTreePixelTest : public ThreadedTest {
scoped_refptr<SolidColorLayer> CreateSolidColorLayer(gfx::Rect rect,
SkColor color);
+ scoped_refptr<SolidColorLayer> CreateSolidColorLayerWithBorder(
+ gfx::Rect rect,
+ SkColor color,
+ int border_width,
+ SkColor border_color);
void RunPixelTest(scoped_refptr<Layer> content_root,
base::FilePath file_name);