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

Side by Side Diff: cc/layer_tree_host_pixeltest_filters.cc

Issue 12518026: cc: Add layer-based pixel tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/test/layer_tree_pixel_test.h"
6
7 #if !defined(OS_ANDROID)
8
9 namespace cc {
10 namespace {
11
12 class LayerTreeHostFiltersPixelTest : public LayerTreePixelTest {};
13
14 TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlur) {
15 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
16 gfx::Rect(200, 200), SK_ColorWHITE);
17
18 // The green box is entirely behind a layer with background blur, so it
19 // should appear blurred on its edges.
20 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayer(
21 gfx::Rect(50, 50, 100, 100), kCSSGreen);
22 scoped_refptr<SolidColorLayer> blur = CreateSolidColorLayer(
23 gfx::Rect(30, 30, 140, 140), SK_ColorTRANSPARENT);
24 background->AddChild(green);
25 background->AddChild(blur);
26
27 WebKit::WebFilterOperations filters;
28 filters.append(WebKit::WebFilterOperation::createBlurFilter(2));
29 blur->SetBackgroundFilters(filters);
30
31 RunPixelTest(background,
32 base::FilePath(FILE_PATH_LITERAL(
33 "background_filter_blur.png")));
34 }
35
36 } // namespace
37 } // namespace cc
38
39 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698