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

Side by Side Diff: cc/layer_tree_host_unittest.cc

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/layer_tree_impl.h » ('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 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/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/synchronization/lock.h" 7 #include "base/synchronization/lock.h"
8 #include "cc/content_layer.h" 8 #include "cc/content_layer.h"
9 #include "cc/content_layer_client.h" 9 #include "cc/content_layer_client.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 public: 2646 public:
2647 static scoped_ptr<EvictionTestLayerImpl> create(LayerTreeImpl* treeImpl, int id) 2647 static scoped_ptr<EvictionTestLayerImpl> create(LayerTreeImpl* treeImpl, int id)
2648 { 2648 {
2649 return make_scoped_ptr(new EvictionTestLayerImpl(treeImpl, id)); 2649 return make_scoped_ptr(new EvictionTestLayerImpl(treeImpl, id));
2650 } 2650 }
2651 virtual ~EvictionTestLayerImpl() { } 2651 virtual ~EvictionTestLayerImpl() { }
2652 2652
2653 virtual void appendQuads(QuadSink& quadSink, AppendQuadsData&) OVERRIDE 2653 virtual void appendQuads(QuadSink& quadSink, AppendQuadsData&) OVERRIDE
2654 { 2654 {
2655 ASSERT_TRUE(m_hasTexture); 2655 ASSERT_TRUE(m_hasTexture);
2656 ASSERT_NE(0u, layerTreeHostImpl()->resourceProvider()->numResources()); 2656 ASSERT_NE(0u, layerTreeImpl()->resource_provider()->numResources());
2657 } 2657 }
2658 2658
2659 void setHasTexture(bool hasTexture) { m_hasTexture = hasTexture; } 2659 void setHasTexture(bool hasTexture) { m_hasTexture = hasTexture; }
2660 2660
2661 private: 2661 private:
2662 EvictionTestLayerImpl(LayerTreeImpl* treeImpl, int id) 2662 EvictionTestLayerImpl(LayerTreeImpl* treeImpl, int id)
2663 : LayerImpl(treeImpl, id) 2663 : LayerImpl(treeImpl, id)
2664 , m_hasTexture(false) { } 2664 , m_hasTexture(false) { }
2665 2665
2666 bool m_hasTexture; 2666 bool m_hasTexture;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 LayerTreeSettings settings; 3379 LayerTreeSettings settings;
3380 settings.maxPartialTextureUpdates = 4; 3380 settings.maxPartialTextureUpdates = 4;
3381 3381
3382 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc oped_ptr<Thread>()); 3382 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc oped_ptr<Thread>());
3383 EXPECT_TRUE(host->initializeRendererIfNeeded()); 3383 EXPECT_TRUE(host->initializeRendererIfNeeded());
3384 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates); 3384 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates);
3385 } 3385 }
3386 3386
3387 } // namespace 3387 } // namespace
3388 } // namespace cc 3388 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698