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

Side by Side Diff: cc/test/tiled_layer_test_common.cc

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/test/tiled_layer_test_common.h ('k') | cc/texture_layer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/test/tiled_layer_test_common.h" 5 #include "cc/test/tiled_layer_test_common.h"
6 6
7 using cc::LayerTilingData; 7 using cc::LayerTilingData;
8 using cc::LayerUpdater; 8 using cc::LayerUpdater;
9 using cc::PriorityCalculator; 9 using cc::PriorityCalculator;
10 using cc::PrioritizedResource; 10 using cc::PrioritizedResource;
11 using cc::PrioritizedResourceManager; 11 using cc::PrioritizedResourceManager;
12 using cc::RenderingStats; 12 using cc::RenderingStats;
13 using cc::ResourceUpdate; 13 using cc::ResourceUpdate;
14 using cc::ResourceUpdateQueue; 14 using cc::ResourceUpdateQueue;
15 15
16 namespace WebKitTests { 16 namespace cc {
17 17
18 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, scoped_ptr<Priorit izedResource> texture) 18 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, scoped_ptr<Priorit izedResource> texture)
19 : LayerUpdater::Resource(texture.Pass()) 19 : LayerUpdater::Resource(texture.Pass())
20 , m_layer(layer) 20 , m_layer(layer)
21 { 21 {
22 m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); 22 m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
23 m_bitmap.allocPixels(); 23 m_bitmap.allocPixels();
24 } 24 }
25 25
26 FakeLayerUpdater::Resource::~Resource() 26 FakeLayerUpdater::Resource::~Resource()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 { 66 {
67 m_rectToInvalidate = rect; 67 m_rectToInvalidate = rect;
68 m_layer = layer; 68 m_layer = layer;
69 } 69 }
70 70
71 scoped_ptr<LayerUpdater::Resource> FakeLayerUpdater::createResource(PrioritizedR esourceManager* manager) 71 scoped_ptr<LayerUpdater::Resource> FakeLayerUpdater::createResource(PrioritizedR esourceManager* manager)
72 { 72 {
73 return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedReso urce::create(manager))); 73 return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedReso urce::create(manager)));
74 } 74 }
75 75
76 FakeTiledLayerImpl::FakeTiledLayerImpl(int id) 76 FakeTiledLayerImpl::FakeTiledLayerImpl(LayerTreeHostImpl* hostImpl, int id)
77 : TiledLayerImpl(id) 77 : TiledLayerImpl(hostImpl, id)
78 { 78 {
79 } 79 }
80 80
81 FakeTiledLayerImpl::~FakeTiledLayerImpl() 81 FakeTiledLayerImpl::~FakeTiledLayerImpl()
82 { 82 {
83 } 83 }
84 84
85 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resourceManager) 85 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resourceManager)
86 : TiledLayer() 86 : TiledLayer()
87 , m_fakeUpdater(make_scoped_refptr(new FakeLayerUpdater)) 87 , m_fakeUpdater(make_scoped_refptr(new FakeLayerUpdater))
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 { 153 {
154 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height( ); 154 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height( );
155 } 155 }
156 156
157 void FakeTiledLayerWithScaledBounds::setContentsScale(float) 157 void FakeTiledLayerWithScaledBounds::setContentsScale(float)
158 { 158 {
159 NOTREACHED(); 159 NOTREACHED();
160 } 160 }
161 161
162 } // namespace 162 } // namespace
OLDNEW
« no previous file with comments | « cc/test/tiled_layer_test_common.h ('k') | cc/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698