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

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

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove external access to layer_id_map_ in LayerTree. Created 4 years, 5 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 class PushPropertiesCountingLayer : public Layer { 2976 class PushPropertiesCountingLayer : public Layer {
2977 public: 2977 public:
2978 static scoped_refptr<PushPropertiesCountingLayer> Create() { 2978 static scoped_refptr<PushPropertiesCountingLayer> Create() {
2979 return new PushPropertiesCountingLayer(); 2979 return new PushPropertiesCountingLayer();
2980 } 2980 }
2981 2981
2982 void PushPropertiesTo(LayerImpl* layer) override { 2982 void PushPropertiesTo(LayerImpl* layer) override {
2983 Layer::PushPropertiesTo(layer); 2983 Layer::PushPropertiesTo(layer);
2984 push_properties_count_++; 2984 push_properties_count_++;
2985 if (persist_needs_push_properties_) { 2985 if (persist_needs_push_properties_) {
2986 layer_tree_host()->AddLayerShouldPushProperties(this); 2986 layer_tree_host()->GetLayerTree()->AddLayerShouldPushProperties(this);
2987 } 2987 }
2988 } 2988 }
2989 2989
2990 // Something to make this layer push properties, but no other layer. 2990 // Something to make this layer push properties, but no other layer.
2991 void MakePushProperties() { SetContentsOpaque(!contents_opaque()); } 2991 void MakePushProperties() { SetContentsOpaque(!contents_opaque()); }
2992 2992
2993 std::unique_ptr<LayerImpl> CreateLayerImpl( 2993 std::unique_ptr<LayerImpl> CreateLayerImpl(
2994 LayerTreeImpl* tree_impl) override { 2994 LayerTreeImpl* tree_impl) override {
2995 return PushPropertiesCountingLayerImpl::Create(tree_impl, id()); 2995 return PushPropertiesCountingLayerImpl::Create(tree_impl, id());
2996 } 2996 }
(...skipping 3876 matching lines...) Expand 10 before | Expand all | Expand 10 after
6873 private: 6873 private:
6874 FakeContentLayerClient client_; 6874 FakeContentLayerClient client_;
6875 const gfx::Size viewport_size_; 6875 const gfx::Size viewport_size_;
6876 const gfx::Size large_image_size_; 6876 const gfx::Size large_image_size_;
6877 }; 6877 };
6878 6878
6879 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); 6879 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage);
6880 6880
6881 } // namespace 6881 } // namespace
6882 } // namespace cc 6882 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698