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

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

Issue 860813002: Remove the default format from ResourcePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error in perftest. Created 5 years, 11 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/resources/zero_copy_tile_task_worker_pool.h" 5 #include "cc/resources/zero_copy_tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 task_set_finished_weak_ptr_factory_(this) { 66 task_set_finished_weak_ptr_factory_(this) {
67 } 67 }
68 68
69 ZeroCopyTileTaskWorkerPool::~ZeroCopyTileTaskWorkerPool() { 69 ZeroCopyTileTaskWorkerPool::~ZeroCopyTileTaskWorkerPool() {
70 } 70 }
71 71
72 TileTaskRunner* ZeroCopyTileTaskWorkerPool::AsTileTaskRunner() { 72 TileTaskRunner* ZeroCopyTileTaskWorkerPool::AsTileTaskRunner() {
73 return this; 73 return this;
74 } 74 }
75 75
76 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat() {
77 return resource_provider_->best_texture_format();
78 }
79
76 void ZeroCopyTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) { 80 void ZeroCopyTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) {
77 client_ = client; 81 client_ = client;
78 } 82 }
79 83
80 void ZeroCopyTileTaskWorkerPool::Shutdown() { 84 void ZeroCopyTileTaskWorkerPool::Shutdown() {
81 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::Shutdown"); 85 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::Shutdown");
82 86
83 TaskGraph empty; 87 TaskGraph empty;
84 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); 88 task_graph_runner_->ScheduleTasks(namespace_token_, &empty);
85 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); 89 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 new base::debug::TracedValue(); 201 new base::debug::TracedValue();
198 202
199 state->BeginArray("tasks_pending"); 203 state->BeginArray("tasks_pending");
200 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) 204 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set)
201 state->AppendBoolean(tasks_pending_[task_set]); 205 state->AppendBoolean(tasks_pending_[task_set]);
202 state->EndArray(); 206 state->EndArray();
203 return state; 207 return state;
204 } 208 }
205 209
206 } // namespace cc 210 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698