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

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

Issue 21839004: cc: Push valid property values when CalcDrawProps skips layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pushpaintprops: Call SavePaintProps when needed in tests 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/layers/tiled_layer.cc » ('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 "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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 needs_set_mailbox_ = true; 172 needs_set_mailbox_ = true;
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 = Layer::Update(queue, occlusion);
183 if (client_) { 183 if (client_) {
184 if (uses_mailbox_) { 184 if (uses_mailbox_) {
185 TextureMailbox mailbox; 185 TextureMailbox mailbox;
186 if (client_->PrepareTextureMailbox( 186 if (client_->PrepareTextureMailbox(
187 &mailbox, layer_tree_host()->UsingSharedMemoryResources())) { 187 &mailbox, layer_tree_host()->UsingSharedMemoryResources())) {
188 SetTextureMailbox(mailbox); 188 SetTextureMailbox(mailbox);
189 updated = true; 189 updated = true;
190 } 190 }
191 } else { 191 } else {
192 DCHECK(client_->Context3d()); 192 DCHECK(client_->Context3d());
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( 315 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread(
316 unsigned sync_point, bool is_lost) { 316 unsigned sync_point, bool is_lost) {
317 message_loop_->PostTask(FROM_HERE, base::Bind( 317 message_loop_->PostTask(FROM_HERE, base::Bind(
318 &MailboxHolder::ReturnAndReleaseOnMainThread, 318 &MailboxHolder::ReturnAndReleaseOnMainThread,
319 this, sync_point, is_lost)); 319 this, sync_point, is_lost));
320 } 320 }
321 321
322 } // namespace cc 322 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/layers/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698