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

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: Make RasterBuffer the public interface used by raster tasks. Created 6 years, 4 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 TestRasterTaskImpl(const Resource* resource, 42 TestRasterTaskImpl(const Resource* resource,
43 const Reply& reply, 43 const Reply& reply,
44 ImageDecodeTask::Vector* dependencies) 44 ImageDecodeTask::Vector* dependencies)
45 : RasterTask(resource, dependencies), reply_(reply) {} 45 : RasterTask(resource, dependencies), reply_(reply) {}
46 46
47 // Overridden from Task: 47 // Overridden from Task:
48 virtual void RunOnWorkerThread() OVERRIDE {} 48 virtual void RunOnWorkerThread() OVERRIDE {}
49 49
50 // Overridden from RasterizerTask: 50 // Overridden from RasterizerTask:
51 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) OVERRIDE { 51 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) OVERRIDE {
52 client->AcquireCanvasForRaster(this); 52 client->AcquireBufferForRaster(this);
53 } 53 }
54 virtual void CompleteOnOriginThread(RasterizerTaskClient* client) OVERRIDE { 54 virtual void CompleteOnOriginThread(RasterizerTaskClient* client) OVERRIDE {
55 client->ReleaseCanvasForRaster(this); 55 client->ReleaseBufferForRaster(this);
56 } 56 }
57 virtual void RunReplyOnOriginThread() OVERRIDE { 57 virtual void RunReplyOnOriginThread() OVERRIDE {
58 reply_.Run(PicturePileImpl::Analysis(), !HasFinishedRunning()); 58 reply_.Run(PicturePileImpl::Analysis(), !HasFinishedRunning());
59 } 59 }
60 60
61 protected: 61 protected:
62 virtual ~TestRasterTaskImpl() {} 62 virtual ~TestRasterTaskImpl() {}
63 63
64 private: 64 private:
65 const Reply reply_; 65 const Reply reply_;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, 327 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests,
328 RasterWorkerPoolTest, 328 RasterWorkerPoolTest,
329 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, 329 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER,
330 RASTER_WORKER_POOL_TYPE_IMAGE, 330 RASTER_WORKER_POOL_TYPE_IMAGE,
331 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, 331 RASTER_WORKER_POOL_TYPE_IMAGE_COPY,
332 RASTER_WORKER_POOL_TYPE_GPU)); 332 RASTER_WORKER_POOL_TYPE_GPU));
333 333
334 } // namespace 334 } // namespace
335 } // namespace cc 335 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698