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

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

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove DCHECK in TextureLayer::OnOutputSurfaceCreated Created 6 years, 10 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/texture_layer.h ('k') | cc/layers/texture_layer_unittest.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/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 release_callback = holder->GetCallbackForImplThread(); 269 release_callback = holder->GetCallbackForImplThread();
270 } 270 }
271 texture_layer->SetTextureMailbox(texture_mailbox, release_callback.Pass()); 271 texture_layer->SetTextureMailbox(texture_mailbox, release_callback.Pass());
272 needs_set_mailbox_ = false; 272 needs_set_mailbox_ = false;
273 } else { 273 } else {
274 texture_layer->SetTextureId(texture_id_); 274 texture_layer->SetTextureId(texture_id_);
275 content_committed_ = DrawsContent(); 275 content_committed_ = DrawsContent();
276 } 276 }
277 } 277 }
278 278
279 void TextureLayer::OnOutputSurfaceCreated() {
280 if (uses_mailbox_) {
281 holder_ref_.reset();
boliu 2014/02/13 20:14:39 I removed the DCHECK for now. This broke context_l
danakj 2014/02/14 17:59:11 Maybe we can do this without adding more LayerAPI.
boliu 2014/02/14 18:44:42 RendererCapabilities is used in the layer_tree_hos
282 }
283 }
284
279 Region TextureLayer::VisibleContentOpaqueRegion() const { 285 Region TextureLayer::VisibleContentOpaqueRegion() const {
280 if (contents_opaque()) 286 if (contents_opaque())
281 return visible_content_rect(); 287 return visible_content_rect();
282 288
283 if (blend_background_color_ && (SkColorGetA(background_color()) == 0xFF)) 289 if (blend_background_color_ && (SkColorGetA(background_color()) == 0xFF))
284 return visible_content_rect(); 290 return visible_content_rect();
285 291
286 return Region(); 292 return Region();
287 } 293 }
288 294
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 357
352 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( 358 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread(
353 uint32 sync_point, 359 uint32 sync_point,
354 bool is_lost) { 360 bool is_lost) {
355 Return(sync_point, is_lost); 361 Return(sync_point, is_lost);
356 message_loop_->PostTask( 362 message_loop_->PostTask(
357 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); 363 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this));
358 } 364 }
359 365
360 } // namespace cc 366 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698