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

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

Issue 454843002: cc: Do bitmap conversion for RasterBuffer in the worker thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 3 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/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 "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 TestRasterTaskImpl(const Resource* resource, 47 TestRasterTaskImpl(const Resource* resource,
48 const Reply& reply, 48 const Reply& reply,
49 ImageDecodeTask::Vector* dependencies) 49 ImageDecodeTask::Vector* dependencies)
50 : RasterTask(resource, dependencies), reply_(reply) {} 50 : RasterTask(resource, dependencies), reply_(reply) {}
51 51
52 // Overridden from Task: 52 // Overridden from Task:
53 virtual void RunOnWorkerThread() OVERRIDE {} 53 virtual void RunOnWorkerThread() OVERRIDE {}
54 54
55 // Overridden from RasterizerTask: 55 // Overridden from RasterizerTask:
56 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) OVERRIDE { 56 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) OVERRIDE {
57 client->AcquireCanvasForRaster(this); 57 client->AcquireBufferForRaster(this);
58 } 58 }
59 virtual void CompleteOnOriginThread(RasterizerTaskClient* client) OVERRIDE { 59 virtual void CompleteOnOriginThread(RasterizerTaskClient* client) OVERRIDE {
60 client->ReleaseCanvasForRaster(this); 60 client->ReleaseBufferForRaster(this);
61 } 61 }
62 virtual void RunReplyOnOriginThread() OVERRIDE { 62 virtual void RunReplyOnOriginThread() OVERRIDE {
63 reply_.Run(PicturePileImpl::Analysis(), !HasFinishedRunning()); 63 reply_.Run(PicturePileImpl::Analysis(), !HasFinishedRunning());
64 } 64 }
65 65
66 protected: 66 protected:
67 virtual ~TestRasterTaskImpl() {} 67 virtual ~TestRasterTaskImpl() {}
68 68
69 private: 69 private:
70 const Reply reply_; 70 const Reply reply_;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, 353 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests,
354 RasterWorkerPoolTest, 354 RasterWorkerPoolTest,
355 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, 355 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER,
356 RASTER_WORKER_POOL_TYPE_IMAGE, 356 RASTER_WORKER_POOL_TYPE_IMAGE,
357 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, 357 RASTER_WORKER_POOL_TYPE_IMAGE_COPY,
358 RASTER_WORKER_POOL_TYPE_GPU)); 358 RASTER_WORKER_POOL_TYPE_GPU));
359 359
360 } // namespace 360 } // namespace
361 } // namespace cc 361 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698