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

Side by Side Diff: cc/raster/tile_task_worker_pool.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, 8 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
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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
11 #include "cc/raster/texture_compressor.h" 11 #include "cc/raster/texture_compressor.h"
12 #include "third_party/skia/include/core/SkCanvas.h" 12 #include "third_party/skia/include/core/SkCanvas.h"
13 #include "third_party/skia/include/core/SkSurface.h" 13 #include "third_party/skia/include/core/SkSurface.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 TileTaskWorkerPool::TileTaskWorkerPool() {} 17 TileTaskWorkerPool::TileTaskWorkerPool() {}
18 18
19 TileTaskWorkerPool::~TileTaskWorkerPool() {} 19 TileTaskWorkerPool::~TileTaskWorkerPool() {}
20 20
21 // static
22 void TileTaskWorkerPool::ScheduleTasksOnOriginThread(TileTaskClient* client,
23 TaskGraph* graph) {
24 TRACE_EVENT0("cc", "TileTaskWorkerPool::ScheduleTasksOnOriginThread");
25
26 for (TaskGraph::Node::Vector::iterator it = graph->nodes.begin();
27 it != graph->nodes.end(); ++it) {
28 TaskGraph::Node& node = *it;
29 TileTask* task = static_cast<TileTask*>(node.task);
30
31 if (!task->HasBeenScheduled()) {
32 task->WillSchedule();
33 task->ScheduleOnOriginThread(client);
34 task->DidSchedule();
35 }
36 }
37 }
38
39 namespace { 21 namespace {
40 22
41 bool IsSupportedPlaybackToMemoryFormat(ResourceFormat format) { 23 bool IsSupportedPlaybackToMemoryFormat(ResourceFormat format) {
42 switch (format) { 24 switch (format) {
43 case RGBA_4444: 25 case RGBA_4444:
44 case RGBA_8888: 26 case RGBA_8888:
45 case BGRA_8888: 27 case BGRA_8888:
46 case ETC1: 28 case ETC1:
47 return true; 29 return true;
48 case ALPHA_8: 30 case ALPHA_8:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 case RED_8: 119 case RED_8:
138 case LUMINANCE_F16: 120 case LUMINANCE_F16:
139 NOTREACHED(); 121 NOTREACHED();
140 return; 122 return;
141 } 123 }
142 124
143 NOTREACHED(); 125 NOTREACHED();
144 } 126 }
145 127
146 } // namespace cc 128 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698