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

Side by Side Diff: cc/raster/tile_task_worker_pool_unittest.cc

Issue 1854513002: cc: Add RasterSource::PlaybackSettings for finer control of raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/raster/tile_task_worker_pool.cc ('k') | cc/raster/zero_copy_tile_task_worker_pool.cc » ('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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ImageDecodeTask::Vector* dependencies) 60 ImageDecodeTask::Vector* dependencies)
61 : RasterTask(dependencies), 61 : RasterTask(dependencies),
62 resource_(resource), 62 resource_(resource),
63 reply_(reply), 63 reply_(reply),
64 raster_source_(FakeRasterSource::CreateFilled(gfx::Size(1, 1))) {} 64 raster_source_(FakeRasterSource::CreateFilled(gfx::Size(1, 1))) {}
65 65
66 // Overridden from Task: 66 // Overridden from Task:
67 void RunOnWorkerThread() override { 67 void RunOnWorkerThread() override {
68 uint64_t new_content_id = 0; 68 uint64_t new_content_id = 0;
69 raster_buffer_->Playback(raster_source_.get(), gfx::Rect(1, 1), 69 raster_buffer_->Playback(raster_source_.get(), gfx::Rect(1, 1),
70 gfx::Rect(1, 1), new_content_id, 1.f, true); 70 gfx::Rect(1, 1), new_content_id, 1.f,
71 RasterSource::PlaybackSettings());
71 } 72 }
72 73
73 // Overridden from TileTask: 74 // Overridden from TileTask:
74 void ScheduleOnOriginThread(TileTaskClient* client) override { 75 void ScheduleOnOriginThread(TileTaskClient* client) override {
75 // The raster buffer has no tile ids associated with it for partial update, 76 // The raster buffer has no tile ids associated with it for partial update,
76 // so doesn't need to provide a valid dirty rect. 77 // so doesn't need to provide a valid dirty rect.
77 raster_buffer_ = client->AcquireBufferForRaster(resource_, 0, 0); 78 raster_buffer_ = client->AcquireBufferForRaster(resource_, 0, 0);
78 } 79 }
79 void CompleteOnOriginThread(TileTaskClient* client) override { 80 void CompleteOnOriginThread(TileTaskClient* client) override {
80 client->ReleaseBufferForRaster(std::move(raster_buffer_)); 81 client->ReleaseBufferForRaster(std::move(raster_buffer_));
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 370
370 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 371 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
371 TileTaskWorkerPoolTest, 372 TileTaskWorkerPoolTest,
372 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 373 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
373 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 374 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
374 TILE_TASK_WORKER_POOL_TYPE_GPU, 375 TILE_TASK_WORKER_POOL_TYPE_GPU,
375 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 376 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
376 377
377 } // namespace 378 } // namespace
378 } // namespace cc 379 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool.cc ('k') | cc/raster/zero_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698