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

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

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 years, 8 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 1319
1320 void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; } 1320 void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; }
1321 1321
1322 void PaintContents(SkCanvas* canvas, 1322 void PaintContents(SkCanvas* canvas,
1323 const gfx::Rect& clip, 1323 const gfx::Rect& clip,
1324 PaintingControlSetting picture_control) override { 1324 PaintingControlSetting picture_control) override {
1325 // Set layer opacity to 0. 1325 // Set layer opacity to 0.
1326 if (test_layer_) 1326 if (test_layer_)
1327 test_layer_->SetOpacity(0.f); 1327 test_layer_->SetOpacity(0.f);
1328 } 1328 }
1329 void PaintContentsToDisplayList( 1329 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
1330 DisplayItemList* display_list,
1331 const gfx::Rect& clip, 1330 const gfx::Rect& clip,
1332 PaintingControlSetting picture_control) override { 1331 PaintingControlSetting picture_control) override {
1333 NOTIMPLEMENTED(); 1332 NOTIMPLEMENTED();
1333 return DisplayItemList::Create();
1334 } 1334 }
1335 bool FillsBoundsCompletely() const override { return false; } 1335 bool FillsBoundsCompletely() const override { return false; }
1336 1336
1337 private: 1337 private:
1338 Layer* test_layer_; 1338 Layer* test_layer_;
1339 }; 1339 };
1340 1340
1341 class ContentLayerWithUpdateTracking : public ContentLayer { 1341 class ContentLayerWithUpdateTracking : public ContentLayer {
1342 public: 1342 public:
1343 static scoped_refptr<ContentLayerWithUpdateTracking> Create( 1343 static scoped_refptr<ContentLayerWithUpdateTracking> Create(
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 SetBoundsClient() : layer_(0) {} 2784 SetBoundsClient() : layer_(0) {}
2785 2785
2786 void set_layer(Layer* layer) { layer_ = layer; } 2786 void set_layer(Layer* layer) { layer_ = layer; }
2787 2787
2788 void PaintContents(SkCanvas* canvas, 2788 void PaintContents(SkCanvas* canvas,
2789 const gfx::Rect& clip, 2789 const gfx::Rect& clip,
2790 PaintingControlSetting picture_control) override { 2790 PaintingControlSetting picture_control) override {
2791 layer_->SetBounds(gfx::Size(2, 2)); 2791 layer_->SetBounds(gfx::Size(2, 2));
2792 } 2792 }
2793 2793
2794 void PaintContentsToDisplayList( 2794 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
2795 DisplayItemList* display_list,
2796 const gfx::Rect& clip, 2795 const gfx::Rect& clip,
2797 PaintingControlSetting picture_control) override { 2796 PaintingControlSetting picture_control) override {
2798 NOTIMPLEMENTED(); 2797 NOTIMPLEMENTED();
2798 return DisplayItemList::Create();
2799 } 2799 }
2800 2800
2801 bool FillsBoundsCompletely() const override { return false; } 2801 bool FillsBoundsCompletely() const override { return false; }
2802 2802
2803 private: 2803 private:
2804 Layer* layer_; 2804 Layer* layer_;
2805 }; 2805 };
2806 2806
2807 LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {} 2807 LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {}
2808 2808
(...skipping 4134 matching lines...) Expand 10 before | Expand all | Expand 10 after
6943 void AfterTest() override {} 6943 void AfterTest() override {}
6944 6944
6945 scoped_refptr<FakePictureLayer> content_child_layer_; 6945 scoped_refptr<FakePictureLayer> content_child_layer_;
6946 FakeContentLayerClient client_; 6946 FakeContentLayerClient client_;
6947 }; 6947 };
6948 6948
6949 SINGLE_AND_MULTI_THREAD_TEST_F( 6949 SINGLE_AND_MULTI_THREAD_TEST_F(
6950 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild); 6950 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild);
6951 6951
6952 } // namespace cc 6952 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698