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

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

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 6 years, 3 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_impl.h ('k') | cc/resources/tile_manager_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/resources/single_release_callback_impl.h"
6
7 #include "base/callback_helpers.h"
8 #include "base/logging.h"
9 #include "cc/trees/blocking_task_runner.h"
10
11 namespace cc {
12
13 SingleReleaseCallbackImpl::SingleReleaseCallbackImpl(
14 const ReleaseCallbackImpl& callback)
15 : has_been_run_(false), callback_(callback) {
16 DCHECK(!callback_.is_null())
17 << "Use a NULL SingleReleaseCallbackImpl for an empty callback.";
18 }
19
20 SingleReleaseCallbackImpl::~SingleReleaseCallbackImpl() {
21 DCHECK(callback_.is_null() || has_been_run_)
22 << "SingleReleaseCallbackImpl was never run.";
23 }
24
25 void SingleReleaseCallbackImpl::Run(
26 uint32 sync_point,
27 bool is_lost,
28 BlockingTaskRunner* main_thread_task_runner) {
29 DCHECK(!has_been_run_) << "SingleReleaseCallbackImpl was run more than once.";
30 has_been_run_ = true;
31 callback_.Run(sync_point, is_lost, main_thread_task_runner);
32 }
33
34 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/single_release_callback_impl.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698