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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/resources/tile_task_worker_pool.h ('k') | cc/resources/transform_display_item.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 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/tile_task_worker_pool.h" 5 #include "cc/resources/tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 DISALLOW_COPY_AND_ASSIGN(TaskSetFinishedTaskImpl); 87 DISALLOW_COPY_AND_ASSIGN(TaskSetFinishedTaskImpl);
88 }; 88 };
89 89
90 } // namespace 90 } // namespace
91 91
92 // This allows a micro benchmark system to run tasks with highest priority, 92 // This allows a micro benchmark system to run tasks with highest priority,
93 // since it should finish as quickly as possible. 93 // since it should finish as quickly as possible.
94 unsigned TileTaskWorkerPool::kBenchmarkTaskPriority = 0u; 94 unsigned TileTaskWorkerPool::kBenchmarkTaskPriority = 0u;
95 // Task priorities that make sure task set finished tasks run before any 95 // Task priorities that make sure task set finished tasks run before any
96 // other remaining tasks. 96 // other remaining tasks. This is combined with the task set type to ensure
97 unsigned TileTaskWorkerPool::kTaskSetFinishedTaskPriority = 1u; 97 // proper prioritization ordering between task set types.
98 unsigned TileTaskWorkerPool::kTileTaskPriorityBase = 2u; 98 unsigned TileTaskWorkerPool::kTaskSetFinishedTaskPriorityBase = 1u;
99 // For correctness, |kTileTaskPriorityBase| must be greater than
100 // |kTaskSetFinishedTaskPriorityBase + kNumberOfTaskSets|.
101 unsigned TileTaskWorkerPool::kTileTaskPriorityBase = 10u;
99 102
100 TileTaskWorkerPool::TileTaskWorkerPool() { 103 TileTaskWorkerPool::TileTaskWorkerPool() {
101 } 104 }
102 105
103 TileTaskWorkerPool::~TileTaskWorkerPool() { 106 TileTaskWorkerPool::~TileTaskWorkerPool() {
104 } 107 }
105 108
106 // static 109 // static
107 void TileTaskWorkerPool::SetNumWorkerThreads(int num_threads) { 110 void TileTaskWorkerPool::SetNumWorkerThreads(int num_threads) {
108 DCHECK_LT(0, num_threads); 111 DCHECK_LT(0, num_threads);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the 263 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the
261 // bitmap data. There will be no need to call SkAlign4 once crbug.com/293728 264 // bitmap data. There will be no need to call SkAlign4 once crbug.com/293728
262 // is fixed. 265 // is fixed.
263 const size_t dst_row_bytes = SkAlign4(dst_info.minRowBytes()); 266 const size_t dst_row_bytes = SkAlign4(dst_info.minRowBytes());
264 DCHECK_EQ(0u, dst_row_bytes % 4); 267 DCHECK_EQ(0u, dst_row_bytes % 4);
265 bool success = canvas->readPixels(dst_info, memory, dst_row_bytes, 0, 0); 268 bool success = canvas->readPixels(dst_info, memory, dst_row_bytes, 0, 0);
266 DCHECK_EQ(true, success); 269 DCHECK_EQ(true, success);
267 } 270 }
268 271
269 } // namespace cc 272 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_task_worker_pool.h ('k') | cc/resources/transform_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698