Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_filters.cc

Issue 17005007: Upgrading Mesa to 9.0.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/data/background_filter_blur_outsets.png ('k') | skia/skia_test_expectations.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 #include "cc/test/layer_tree_pixel_test.h" 6 #include "cc/test/layer_tree_pixel_test.h"
7 #include "cc/test/pixel_comparator.h" 7 #include "cc/test/pixel_comparator.h"
8 8
9 #if !defined(OS_ANDROID) 9 #if !defined(OS_ANDROID)
10 10
11 namespace cc { 11 namespace cc {
12 namespace { 12 namespace {
13 13
14 class LayerTreeHostFiltersPixelTest : public LayerTreePixelTest {}; 14 class LayerTreeHostFiltersPixelTest : public LayerTreePixelTest {
15 virtual void BeginTest() OVERRIDE;
16 };
17
18 void LayerTreeHostFiltersPixelTest::BeginTest() {
19 LayerTreePixelTest::BeginTest();
20 pixel_comparator_.reset(
21 new FuzzyPixelComparator(true, 100.f, 0.f, 1.f, 2, 0));
22 }
15 23
16 TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlur) { 24 TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlur) {
17 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer( 25 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
18 gfx::Rect(200, 200), SK_ColorWHITE); 26 gfx::Rect(200, 200), SK_ColorWHITE);
19 27
20 // The green box is entirely behind a layer with background blur, so it 28 // The green box is entirely behind a layer with background blur, so it
21 // should appear blurred on its edges. 29 // should appear blurred on its edges.
22 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayer( 30 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayer(
23 gfx::Rect(50, 50, 100, 100), kCSSGreen); 31 gfx::Rect(50, 50, 100, 100), kCSSGreen);
24 scoped_refptr<SolidColorLayer> blur = CreateSolidColorLayer( 32 scoped_refptr<SolidColorLayer> blur = CreateSolidColorLayer(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 RunPixelTest(GL_WITH_BITMAP, 120 RunPixelTest(GL_WITH_BITMAP,
113 background, 121 background,
114 base::FilePath(FILE_PATH_LITERAL( 122 base::FilePath(FILE_PATH_LITERAL(
115 "background_filter_blur_off_axis.png"))); 123 "background_filter_blur_off_axis.png")));
116 } 124 }
117 125
118 } // namespace 126 } // namespace
119 } // namespace cc 127 } // namespace cc
120 128
121 #endif // OS_ANDROID 129 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/test/data/background_filter_blur_outsets.png ('k') | skia/skia_test_expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698