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

Side by Side Diff: cc/layers/texture_layer.cc

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 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 | « cc/layers/texture_layer.h ('k') | cc/layers/tiled_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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/texture_layer.h" 5 #include "cc/layers/texture_layer.h"
6 6
7 #include "cc/base/thread.h" 7 #include "cc/base/thread.h"
8 #include "cc/layers/texture_layer_client.h" 8 #include "cc/layers/texture_layer_client.h"
9 #include "cc/layers/texture_layer_impl.h" 9 #include "cc/layers/texture_layer_impl.h"
10 #include "cc/trees/layer_tree_host.h" 10 #include "cc/trees/layer_tree_host.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 layer_tree_host()->AcquireLayerTextures(); 148 layer_tree_host()->AcquireLayerTextures();
149 Layer::SetLayerTreeHost(host); 149 Layer::SetLayerTreeHost(host);
150 } 150 }
151 151
152 bool TextureLayer::DrawsContent() const { 152 bool TextureLayer::DrawsContent() const {
153 return (client_ || texture_id_ || !texture_mailbox_.IsEmpty()) && 153 return (client_ || texture_id_ || !texture_mailbox_.IsEmpty()) &&
154 !context_lost_ && Layer::DrawsContent(); 154 !context_lost_ && Layer::DrawsContent();
155 } 155 }
156 156
157 void TextureLayer::Update(ResourceUpdateQueue* queue, 157 void TextureLayer::Update(ResourceUpdateQueue* queue,
158 const OcclusionTracker* occlusion, 158 const OcclusionTracker* occlusion) {
159 RenderingStats* stats) {
160 if (client_) { 159 if (client_) {
161 texture_id_ = client_->PrepareTexture(queue); 160 texture_id_ = client_->PrepareTexture(queue);
162 context_lost_ = 161 context_lost_ =
163 client_->Context3d()->getGraphicsResetStatusARB() != GL_NO_ERROR; 162 client_->Context3d()->getGraphicsResetStatusARB() != GL_NO_ERROR;
164 } 163 }
165 164
166 needs_display_ = false; 165 needs_display_ = false;
167 } 166 }
168 167
169 void TextureLayer::PushPropertiesTo(LayerImpl* layer) { 168 void TextureLayer::PushPropertiesTo(LayerImpl* layer) {
(...skipping 25 matching lines...) Expand all
195 // triple-buffered. Single-buffered layers already prevent draws, so 194 // triple-buffered. Single-buffered layers already prevent draws, so
196 // can block too for simplicity. 195 // can block too for simplicity.
197 return DrawsContent(); 196 return DrawsContent();
198 } 197 }
199 198
200 bool TextureLayer::CanClipSelf() const { 199 bool TextureLayer::CanClipSelf() const {
201 return true; 200 return true;
202 } 201 }
203 202
204 } // namespace cc 203 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/tiled_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698