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

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

Issue 982413003: cc: Disable more mask pixel tests on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move ifdefs Created 5 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
« no previous file with comments | « no previous file | no next file » | 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"
11 #include "cc/test/pixel_comparator.h" 11 #include "cc/test/pixel_comparator.h"
12 12
13 #if !defined(OS_ANDROID) 13 #if !defined(OS_ANDROID)
14 14
15 // TODO(enne): these time out on Windows. http://crbug.com/435632
16 #if !defined(OS_WIN)
17
15 namespace cc { 18 namespace cc {
16 namespace { 19 namespace {
17 20
18 typedef ParameterizedPixelResourceTest LayerTreeHostMasksPixelTest; 21 typedef ParameterizedPixelResourceTest LayerTreeHostMasksPixelTest;
19 22
20 INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(LayerTreeHostMasksPixelTest); 23 INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(LayerTreeHostMasksPixelTest);
21 24
22 class MaskContentLayerClient : public ContentLayerClient { 25 class MaskContentLayerClient : public ContentLayerClient {
23 public: 26 public:
24 explicit MaskContentLayerClient(const gfx::Size& bounds) : bounds_(bounds) {} 27 explicit MaskContentLayerClient(const gfx::Size& bounds) : bounds_(bounds) {}
(...skipping 25 matching lines...) Expand all
50 const gfx::Rect& clip, 53 const gfx::Rect& clip,
51 PaintingControlSetting picture_control) override { 54 PaintingControlSetting picture_control) override {
52 NOTIMPLEMENTED(); 55 NOTIMPLEMENTED();
53 return DisplayItemList::Create(); 56 return DisplayItemList::Create();
54 } 57 }
55 58
56 private: 59 private:
57 gfx::Size bounds_; 60 gfx::Size bounds_;
58 }; 61 };
59 62
60 // TODO(enne): these time out on Windows. http://crbug.com/435632
61 #if !defined(OS_WIN)
62
63 TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) { 63 TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) {
64 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer( 64 scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
65 gfx::Rect(200, 200), SK_ColorWHITE); 65 gfx::Rect(200, 200), SK_ColorWHITE);
66 66
67 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder( 67 scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
68 gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK); 68 gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
69 background->AddChild(green); 69 background->AddChild(green);
70 70
71 gfx::Size mask_bounds(100, 100); 71 gfx::Size mask_bounds(100, 100);
72 MaskContentLayerClient client(mask_bounds); 72 MaskContentLayerClient client(mask_bounds);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 replica->SetPosition(gfx::Point()); 273 replica->SetPosition(gfx::Point());
274 replica->SetTransform(replica_transform); 274 replica->SetTransform(replica_transform);
275 replica->SetMaskLayer(mask.get()); 275 replica->SetMaskLayer(mask.get());
276 green->SetReplicaLayer(replica.get()); 276 green->SetReplicaLayer(replica.get());
277 277
278 RunPixelResourceTest(background, 278 RunPixelResourceTest(background,
279 base::FilePath(FILE_PATH_LITERAL( 279 base::FilePath(FILE_PATH_LITERAL(
280 "mask_of_replica_of_clipped_layer.png"))); 280 "mask_of_replica_of_clipped_layer.png")));
281 } 281 }
282 282
283 #endif // !defined(OS_WIN)
284
285 class CheckerContentLayerClient : public ContentLayerClient { 283 class CheckerContentLayerClient : public ContentLayerClient {
286 public: 284 public:
287 CheckerContentLayerClient(const gfx::Size& bounds, 285 CheckerContentLayerClient(const gfx::Size& bounds,
288 SkColor color, 286 SkColor color,
289 bool vertical) 287 bool vertical)
290 : bounds_(bounds), color_(color), vertical_(vertical) {} 288 : bounds_(bounds), color_(color), vertical_(vertical) {}
291 ~CheckerContentLayerClient() override {} 289 ~CheckerContentLayerClient() override {}
292 bool FillsBoundsCompletely() const override { return false; } 290 bool FillsBoundsCompletely() const override { return false; }
293 void PaintContents(SkCanvas* canvas, 291 void PaintContents(SkCanvas* canvas,
294 const gfx::Rect& rect, 292 const gfx::Rect& rect,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 small_error_allowed)); 458 small_error_allowed));
461 459
462 RunPixelResourceTest(background, 460 RunPixelResourceTest(background,
463 base::FilePath( 461 base::FilePath(
464 FILE_PATH_LITERAL("mask_of_layer_with_blend.png"))); 462 FILE_PATH_LITERAL("mask_of_layer_with_blend.png")));
465 } 463 }
466 464
467 } // namespace 465 } // namespace
468 } // namespace cc 466 } // namespace cc
469 467
470 #endif // OS_ANDROID 468 #endif // !defined(OS_WIN)
469 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698