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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/trees/layer_tree_host_pixeltest_blending.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('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/layers/content_layer_client.h" 6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_image_layer.h" 7 #include "cc/layers/picture_image_layer.h"
8 #include "cc/layers/picture_layer.h" 8 #include "cc/layers/picture_layer.h"
9 #include "cc/layers/solid_color_layer.h" 9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/test/layer_tree_pixel_resource_test.h" 10 #include "cc/test/layer_tree_pixel_resource_test.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 inset_rect.width(), inset_rect.height()), 44 inset_rect.width(), inset_rect.height()),
45 paint); 45 paint);
46 inset_rect.Inset(3, 3, 2, 2); 46 inset_rect.Inset(3, 3, 2, 2);
47 } 47 }
48 } 48 }
49 49
50 private: 50 private:
51 gfx::Size bounds_; 51 gfx::Size bounds_;
52 }; 52 };
53 53
54 // TODO(enne): these time out on Windows. http://crbug.com/435632
55 #if !defined(OS_WIN)
56
54 TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) { 57 TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) {
55 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer( 58 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
56 gfx::Rect(200, 200), SK_ColorWHITE); 59 gfx::Rect(200, 200), SK_ColorWHITE);
57 60
58 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder( 61 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
59 gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK); 62 gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
60 background->AddChild(green); 63 background->AddChild(green);
61 64
62 gfx::Size mask_bounds(100, 100); 65 gfx::Size mask_bounds(100, 100);
63 MaskContentLayerClient client(mask_bounds); 66 MaskContentLayerClient client(mask_bounds);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 replica->SetPosition(gfx::Point()); 268 replica->SetPosition(gfx::Point());
266 replica->SetTransform(replica_transform); 269 replica->SetTransform(replica_transform);
267 replica->SetMaskLayer(mask.get()); 270 replica->SetMaskLayer(mask.get());
268 green->SetReplicaLayer(replica.get()); 271 green->SetReplicaLayer(replica.get());
269 272
270 RunPixelResourceTest(background, 273 RunPixelResourceTest(background,
271 base::FilePath(FILE_PATH_LITERAL( 274 base::FilePath(FILE_PATH_LITERAL(
272 "mask_of_replica_of_clipped_layer.png"))); 275 "mask_of_replica_of_clipped_layer.png")));
273 } 276 }
274 277
278 #endif // !defined(OS_WIN)
279
275 } // namespace 280 } // namespace
276 } // namespace cc 281 } // namespace cc
277 282
278 #endif // OS_ANDROID 283 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_blending.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698