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

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

Issue 69343011: cc: Rationalize sync points and lost status for returned resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/delegated_frame_resource_collection.cc ('k') | cc/layers/texture_layer_impl.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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 holder_->InternalRelease(); 293 holder_->InternalRelease();
294 } 294 }
295 295
296 TextureLayer::MailboxHolder::MailboxHolder( 296 TextureLayer::MailboxHolder::MailboxHolder(
297 const TextureMailbox& mailbox, 297 const TextureMailbox& mailbox,
298 scoped_ptr<SingleReleaseCallback> release_callback) 298 scoped_ptr<SingleReleaseCallback> release_callback)
299 : message_loop_(BlockingTaskRunner::current()), 299 : message_loop_(BlockingTaskRunner::current()),
300 internal_references_(0), 300 internal_references_(0),
301 mailbox_(mailbox), 301 mailbox_(mailbox),
302 release_callback_(release_callback.Pass()), 302 release_callback_(release_callback.Pass()),
303 sync_point_(mailbox.sync_point()), 303 sync_point_(0),
304 is_lost_(false) { 304 is_lost_(false) {}
305 }
306 305
307 TextureLayer::MailboxHolder::~MailboxHolder() { 306 TextureLayer::MailboxHolder::~MailboxHolder() {
308 DCHECK_EQ(0u, internal_references_); 307 DCHECK_EQ(0u, internal_references_);
309 } 308 }
310 309
311 scoped_ptr<TextureLayer::MailboxHolder::MainThreadReference> 310 scoped_ptr<TextureLayer::MailboxHolder::MainThreadReference>
312 TextureLayer::MailboxHolder::Create( 311 TextureLayer::MailboxHolder::Create(
313 const TextureMailbox& mailbox, 312 const TextureMailbox& mailbox,
314 scoped_ptr<SingleReleaseCallback> release_callback) { 313 scoped_ptr<SingleReleaseCallback> release_callback) {
315 return scoped_ptr<MainThreadReference>(new MainThreadReference( 314 return scoped_ptr<MainThreadReference>(new MainThreadReference(
(...skipping 30 matching lines...) Expand all
346 } 345 }
347 346
348 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( 347 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread(
349 unsigned sync_point, bool is_lost) { 348 unsigned sync_point, bool is_lost) {
350 Return(sync_point, is_lost); 349 Return(sync_point, is_lost);
351 message_loop_->PostTask(FROM_HERE, 350 message_loop_->PostTask(FROM_HERE,
352 base::Bind(&MailboxHolder::InternalRelease, this)); 351 base::Bind(&MailboxHolder::InternalRelease, this));
353 } 352 }
354 353
355 } // namespace cc 354 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_frame_resource_collection.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698