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

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

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase code Created 7 years, 4 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 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "cc/layers/texture_layer_client.h" 10 #include "cc/layers/texture_layer_client.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 Layer::SetLayerTreeHost(host); 173 Layer::SetLayerTreeHost(host);
174 } 174 }
175 175
176 bool TextureLayer::DrawsContent() const { 176 bool TextureLayer::DrawsContent() const {
177 return (client_ || texture_id_ || holder_ref_) && Layer::DrawsContent(); 177 return (client_ || texture_id_ || holder_ref_) && Layer::DrawsContent();
178 } 178 }
179 179
180 bool TextureLayer::Update(ResourceUpdateQueue* queue, 180 bool TextureLayer::Update(ResourceUpdateQueue* queue,
181 const OcclusionTracker* occlusion) { 181 const OcclusionTracker* occlusion) {
182 bool updated = false; 182 bool updated = false;
183 Layer::Update(queue, occlusion);
184
183 if (client_) { 185 if (client_) {
184 if (uses_mailbox_) { 186 if (uses_mailbox_) {
185 TextureMailbox mailbox; 187 TextureMailbox mailbox;
186 if (client_->PrepareTextureMailbox( 188 if (client_->PrepareTextureMailbox(
187 &mailbox, layer_tree_host()->UsingSharedMemoryResources())) { 189 &mailbox, layer_tree_host()->UsingSharedMemoryResources())) {
188 SetTextureMailbox(mailbox); 190 SetTextureMailbox(mailbox);
189 updated = true; 191 updated = true;
190 } 192 }
191 } else { 193 } else {
192 DCHECK(client_->Context3d()); 194 DCHECK(client_->Context3d());
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 315 }
314 316
315 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( 317 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread(
316 unsigned sync_point, bool is_lost) { 318 unsigned sync_point, bool is_lost) {
317 message_loop_->PostTask(FROM_HERE, base::Bind( 319 message_loop_->PostTask(FROM_HERE, base::Bind(
318 &MailboxHolder::ReturnAndReleaseOnMainThread, 320 &MailboxHolder::ReturnAndReleaseOnMainThread,
319 this, sync_point, is_lost)); 321 this, sync_point, is_lost));
320 } 322 }
321 323
322 } // namespace cc 324 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698