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

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: 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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 PaintingControlSetting picture_control) override { 51 PaintingControlSetting picture_control) override {
52 NOTIMPLEMENTED(); 52 NOTIMPLEMENTED();
53 return DisplayItemList::Create(); 53 return DisplayItemList::Create();
54 } 54 }
55 55
56 private: 56 private:
57 gfx::Size bounds_; 57 gfx::Size bounds_;
58 }; 58 };
59 59
60 // TODO(enne): these time out on Windows. http://crbug.com/435632 60 // TODO(enne): these time out on Windows. http://crbug.com/435632
61 #if !defined(OS_WIN) 61 #if !defined(OS_WIN)
danakj 2015/03/06 22:32:57 might as well move this up by the ANDROID one?
62 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);
(...skipping 201 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 percentage_pixels_small_error, 455 percentage_pixels_small_error,
458 average_error_allowed_in_bad_pixels, 456 average_error_allowed_in_bad_pixels,
459 large_error_allowed, 457 large_error_allowed,
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
465 #endif // !defined(OS_WIN)
danakj 2015/03/06 22:32:57 and move this down with the ANDROID one?
466
467 } // namespace 467 } // namespace
468 } // namespace cc 468 } // namespace cc
469 469
470 #endif // OS_ANDROID 470 #endif // 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