| OLD | NEW |
| 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 <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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 picture_pile_(FakePicturePileImpl::CreateEmptyPile(gfx::Size(1, 1), | 64 picture_pile_(FakePicturePileImpl::CreateEmptyPile(gfx::Size(1, 1), |
| 65 gfx::Size(1, 1))) {} | 65 gfx::Size(1, 1))) {} |
| 66 | 66 |
| 67 // Overridden from Task: | 67 // Overridden from Task: |
| 68 void RunOnWorkerThread() override { | 68 void RunOnWorkerThread() override { |
| 69 raster_buffer_->Playback(picture_pile_.get(), gfx::Rect(0, 0, 1, 1), 1.0); | 69 raster_buffer_->Playback(picture_pile_.get(), gfx::Rect(0, 0, 1, 1), 1.0); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // Overridden from TileTask: | 72 // Overridden from TileTask: |
| 73 void ScheduleOnOriginThread(TileTaskClient* client) override { | 73 void ScheduleOnOriginThread(TileTaskClient* client) override { |
| 74 raster_buffer_ = client->AcquireBufferForRaster(resource()); | 74 // The raster buffer has no tile ids associated with it for partial update, |
| 75 // so doesn't need to provide a valid dirty rect. |
| 76 TileTaskData data(resource(), 0, 0, gfx::Rect()); |
| 77 raster_buffer_ = client->AcquireBufferForRaster(data); |
| 75 } | 78 } |
| 76 void CompleteOnOriginThread(TileTaskClient* client) override { | 79 void CompleteOnOriginThread(TileTaskClient* client) override { |
| 77 client->ReleaseBufferForRaster(raster_buffer_.Pass()); | 80 client->ReleaseBufferForRaster(raster_buffer_.Pass()); |
| 78 } | 81 } |
| 79 void RunReplyOnOriginThread() override { | 82 void RunReplyOnOriginThread() override { |
| 80 reply_.Run(RasterSource::SolidColorAnalysis(), !HasFinishedRunning()); | 83 reply_.Run(RasterSource::SolidColorAnalysis(), !HasFinishedRunning()); |
| 81 } | 84 } |
| 82 | 85 |
| 83 protected: | 86 protected: |
| 84 ~TestRasterTaskImpl() override {} | 87 ~TestRasterTaskImpl() override {} |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 TileTaskWorkerPoolTests, | 436 TileTaskWorkerPoolTests, |
| 434 TileTaskWorkerPoolTest, | 437 TileTaskWorkerPoolTest, |
| 435 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, | 438 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, |
| 436 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, | 439 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, |
| 437 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, | 440 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, |
| 438 TILE_TASK_WORKER_POOL_TYPE_GPU, | 441 TILE_TASK_WORKER_POOL_TYPE_GPU, |
| 439 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); | 442 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); |
| 440 | 443 |
| 441 } // namespace | 444 } // namespace |
| 442 } // namespace cc | 445 } // namespace cc |
| OLD | NEW |