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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 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/raster_worker_pool.cc ('k') | cc/resources/resource.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/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/resources/image_raster_worker_pool.h" 10 #include "cc/resources/image_raster_worker_pool.h"
(...skipping 26 matching lines...) Expand all
37 bool use_gpu_rasterization) 37 bool use_gpu_rasterization)
38 : internal::RasterWorkerPoolTask(resource, 38 : internal::RasterWorkerPoolTask(resource,
39 dependencies, 39 dependencies,
40 use_gpu_rasterization), 40 use_gpu_rasterization),
41 reply_(reply), 41 reply_(reply),
42 raster_thread_(RASTER_THREAD_NONE) {} 42 raster_thread_(RASTER_THREAD_NONE) {}
43 43
44 // Overridden from internal::RasterWorkerPoolTask: 44 // Overridden from internal::RasterWorkerPoolTask:
45 virtual bool RunOnWorkerThread(unsigned thread_index, 45 virtual bool RunOnWorkerThread(unsigned thread_index,
46 void* buffer, 46 void* buffer,
47 gfx::Size size, 47 const gfx::Size& size,
48 int stride) OVERRIDE { 48 int stride) OVERRIDE {
49 raster_thread_ = RASTER_THREAD_WORKER; 49 raster_thread_ = RASTER_THREAD_WORKER;
50 return true; 50 return true;
51 } 51 }
52 virtual void RunOnOriginThread(ResourceProvider* resource_provider, 52 virtual void RunOnOriginThread(ResourceProvider* resource_provider,
53 ContextProvider* context_provider) OVERRIDE { 53 ContextProvider* context_provider) OVERRIDE {
54 raster_thread_ = RASTER_THREAD_ORIGIN; 54 raster_thread_ = RASTER_THREAD_ORIGIN;
55 } 55 }
56 virtual void CompleteOnOriginThread() OVERRIDE { 56 virtual void CompleteOnOriginThread() OVERRIDE {
57 reply_.Run(PicturePileImpl::Analysis(), 57 reply_.Run(PicturePileImpl::Analysis(),
(...skipping 20 matching lines...) Expand all
78 bool use_gpu_rasterization) 78 bool use_gpu_rasterization)
79 : TestRasterWorkerPoolTaskImpl(resource, 79 : TestRasterWorkerPoolTaskImpl(resource,
80 reply, 80 reply,
81 dependencies, 81 dependencies,
82 use_gpu_rasterization), 82 use_gpu_rasterization),
83 lock_(lock) {} 83 lock_(lock) {}
84 84
85 // Overridden from internal::RasterWorkerPoolTask: 85 // Overridden from internal::RasterWorkerPoolTask:
86 virtual bool RunOnWorkerThread(unsigned thread_index, 86 virtual bool RunOnWorkerThread(unsigned thread_index,
87 void* buffer, 87 void* buffer,
88 gfx::Size size, 88 const gfx::Size& size,
89 int stride) OVERRIDE { 89 int stride) OVERRIDE {
90 base::AutoLock lock(*lock_); 90 base::AutoLock lock(*lock_);
91 return TestRasterWorkerPoolTaskImpl::RunOnWorkerThread( 91 return TestRasterWorkerPoolTaskImpl::RunOnWorkerThread(
92 thread_index, buffer, size, stride); 92 thread_index, buffer, size, stride);
93 } 93 }
94 virtual void CompleteOnOriginThread() OVERRIDE {} 94 virtual void CompleteOnOriginThread() OVERRIDE {}
95 95
96 protected: 96 protected:
97 virtual ~BlockingRasterWorkerPoolTaskImpl() {} 97 virtual ~BlockingRasterWorkerPoolTaskImpl() {}
98 98
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 virtual void DidFinishRunningTasks() OVERRIDE { EndTest(); } 446 virtual void DidFinishRunningTasks() OVERRIDE { EndTest(); }
447 447
448 base::Lock lock_; 448 base::Lock lock_;
449 }; 449 };
450 450
451 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFalseThrottling); 451 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFalseThrottling);
452 452
453 } // namespace 453 } // namespace
454 } // namespace cc 454 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698