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

Side by Side Diff: cc/resources/single_release_callback.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. 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/resources/single_release_callback.h ('k') | cc/resources/texture_mailbox.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/single_release_callback.h" 5 #include "cc/resources/single_release_callback.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 SingleReleaseCallback::SingleReleaseCallback(const ReleaseCallback& callback) 12 SingleReleaseCallback::SingleReleaseCallback(const ReleaseCallback& callback)
13 : has_been_run_(false), callback_(callback) { 13 : has_been_run_(false), callback_(callback) {
14 DCHECK(!callback_.is_null()) 14 DCHECK(!callback_.is_null())
15 << "Use a NULL SingleReleaseCallback for an empty callback."; 15 << "Use a NULL SingleReleaseCallback for an empty callback.";
16 } 16 }
17 17
18 SingleReleaseCallback::~SingleReleaseCallback() { 18 SingleReleaseCallback::~SingleReleaseCallback() {
19 DCHECK(callback_.is_null() || has_been_run_) 19 DCHECK(callback_.is_null() || has_been_run_)
20 << "SingleReleaseCallback was never run."; 20 << "SingleReleaseCallback was never run.";
21 } 21 }
22 22
23 void SingleReleaseCallback::Run(unsigned sync_point, bool is_lost) { 23 void SingleReleaseCallback::Run(uint32 sync_point, bool is_lost) {
24 DCHECK(!has_been_run_) << "SingleReleaseCallback was run more than once."; 24 DCHECK(!has_been_run_) << "SingleReleaseCallback was run more than once.";
25 has_been_run_ = true; 25 has_been_run_ = true;
26 callback_.Run(sync_point, is_lost); 26 callback_.Run(sync_point, is_lost);
27 } 27 }
28 28
29 } // namespace cc 29 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/single_release_callback.h ('k') | cc/resources/texture_mailbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698