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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 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
« no previous file with comments | « cc/resources/single_release_callback_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_impl.h" 5 #include "cc/resources/single_release_callback_impl.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 #include "cc/trees/blocking_task_runner.h" 9 #include "cc/trees/blocking_task_runner.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 SingleReleaseCallbackImpl::SingleReleaseCallbackImpl( 13 SingleReleaseCallbackImpl::SingleReleaseCallbackImpl(
14 const ReleaseCallbackImpl& callback) 14 const ReleaseCallbackImpl& callback)
15 : callback_(callback) { 15 : callback_(callback) {
16 DCHECK(!callback_.is_null()) 16 DCHECK(!callback_.is_null())
17 << "Use a NULL SingleReleaseCallbackImpl for an empty callback."; 17 << "Use a NULL SingleReleaseCallbackImpl for an empty callback.";
18 } 18 }
19 19
20 SingleReleaseCallbackImpl::~SingleReleaseCallbackImpl() { 20 SingleReleaseCallbackImpl::~SingleReleaseCallbackImpl() {
21 DCHECK(callback_.is_null()) << "SingleReleaseCallbackImpl was never run."; 21 DCHECK(callback_.is_null()) << "SingleReleaseCallbackImpl was never run.";
22 } 22 }
23 23
24 void SingleReleaseCallbackImpl::Run( 24 void SingleReleaseCallbackImpl::Run(
25 uint32 sync_point, 25 const gpu::SyncToken& sync_token,
26 bool is_lost, 26 bool is_lost,
27 BlockingTaskRunner* main_thread_task_runner) { 27 BlockingTaskRunner* main_thread_task_runner) {
28 DCHECK(!callback_.is_null()) 28 DCHECK(!callback_.is_null())
29 << "SingleReleaseCallbackImpl was run more than once."; 29 << "SingleReleaseCallbackImpl was run more than once.";
30 base::ResetAndReturn(&callback_) 30 base::ResetAndReturn(&callback_)
31 .Run(sync_point, is_lost, main_thread_task_runner); 31 .Run(sync_token, is_lost, main_thread_task_runner);
32 } 32 }
33 33
34 } // namespace cc 34 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/single_release_callback_impl.h ('k') | cc/resources/texture_mailbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698