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

Side by Side Diff: cc/raster/tile_task.cc

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 7 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
« no previous file with comments | « cc/raster/tile_task.h ('k') | cc/test/fake_tile_task_manager.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/raster/tile_task.h" 5 #include "cc/raster/tile_task.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 TileTask::TileTask(bool supports_concurrent_execution) 11 TileTask::TileTask(bool supports_concurrent_execution)
12 : supports_concurrent_execution_(supports_concurrent_execution), 12 : supports_concurrent_execution_(supports_concurrent_execution) {}
13 did_schedule_(false),
14 did_complete_(false) {}
15 13
16 TileTask::TileTask(bool supports_concurrent_execution, 14 TileTask::TileTask(bool supports_concurrent_execution,
17 TileTask::Vector* dependencies) 15 TileTask::Vector* dependencies)
18 : supports_concurrent_execution_(supports_concurrent_execution), 16 : supports_concurrent_execution_(supports_concurrent_execution),
19 dependencies_(std::move(*dependencies)), 17 dependencies_(std::move(*dependencies)) {}
20 did_schedule_(false),
21 did_complete_(false) {}
22 18
23 TileTask::~TileTask() { 19 TileTask::~TileTask() {}
24 DCHECK(!did_schedule_);
25 DCHECK(!state().IsFinished() || did_complete_);
26 }
27
28 void TileTask::WillSchedule() {
29 DCHECK(!did_schedule_);
30 }
31
32 void TileTask::DidSchedule() {
33 did_schedule_ = true;
34 did_complete_ = false;
35 }
36
37 bool TileTask::HasBeenScheduled() const {
38 return did_schedule_;
39 }
40
41 void TileTask::WillComplete() {
42 DCHECK(!did_complete_);
43 }
44
45 void TileTask::DidComplete() {
46 DCHECK(did_schedule_);
47 DCHECK(!did_complete_);
48 did_schedule_ = false;
49 did_complete_ = true;
50 }
51
52 bool TileTask::HasCompleted() const {
53 return did_complete_;
54 }
55 20
56 } // namespace cc 21 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task.h ('k') | cc/test/fake_tile_task_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698