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

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

Issue 1888713002: cc: Merge TileTaskRunner to TileTaskWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_tile_task_client
Patch Set: feedback 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
« no previous file with comments | « cc/raster/zero_copy_tile_task_worker_pool.h ('k') | cc/test/fake_tile_manager.cc » ('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/raster/zero_copy_tile_task_worker_pool.h" 5 #include "cc/raster/zero_copy_tile_task_worker_pool.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ResourceFormat preferred_tile_format) 82 ResourceFormat preferred_tile_format)
83 : task_runner_(task_runner), 83 : task_runner_(task_runner),
84 task_graph_runner_(task_graph_runner), 84 task_graph_runner_(task_graph_runner),
85 namespace_token_(task_graph_runner->GetNamespaceToken()), 85 namespace_token_(task_graph_runner->GetNamespaceToken()),
86 resource_provider_(resource_provider), 86 resource_provider_(resource_provider),
87 preferred_tile_format_(preferred_tile_format) {} 87 preferred_tile_format_(preferred_tile_format) {}
88 88
89 ZeroCopyTileTaskWorkerPool::~ZeroCopyTileTaskWorkerPool() { 89 ZeroCopyTileTaskWorkerPool::~ZeroCopyTileTaskWorkerPool() {
90 } 90 }
91 91
92 TileTaskRunner* ZeroCopyTileTaskWorkerPool::AsTileTaskRunner() {
93 return this;
94 }
95
96 void ZeroCopyTileTaskWorkerPool::Shutdown() { 92 void ZeroCopyTileTaskWorkerPool::Shutdown() {
97 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::Shutdown"); 93 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::Shutdown");
98 94
99 TaskGraph empty; 95 TaskGraph empty;
100 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); 96 task_graph_runner_->ScheduleTasks(namespace_token_, &empty);
101 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); 97 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
102 } 98 }
103 99
104 void ZeroCopyTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) { 100 void ZeroCopyTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) {
105 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::ScheduleTasks"); 101 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::ScheduleTasks");
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return base::WrapUnique<RasterBuffer>( 148 return base::WrapUnique<RasterBuffer>(
153 new RasterBufferImpl(resource_provider_, resource)); 149 new RasterBufferImpl(resource_provider_, resource));
154 } 150 }
155 151
156 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster( 152 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster(
157 std::unique_ptr<RasterBuffer> buffer) { 153 std::unique_ptr<RasterBuffer> buffer) {
158 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. 154 // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
159 } 155 }
160 156
161 } // namespace cc 157 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/zero_copy_tile_task_worker_pool.h ('k') | cc/test/fake_tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698