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

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

Issue 1903733003: cc: Implement states for Task for stricter control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@land_merge_tile_task_runner
Patch Set: feedback 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 // Overridden from TileTask: 73 // Overridden from TileTask:
74 void ScheduleOnOriginThread(RasterBufferProvider* provider) override { 74 void ScheduleOnOriginThread(RasterBufferProvider* provider) override {
75 // The raster buffer has no tile ids associated with it for partial update, 75 // The raster buffer has no tile ids associated with it for partial update,
76 // so doesn't need to provide a valid dirty rect. 76 // so doesn't need to provide a valid dirty rect.
77 raster_buffer_ = provider->AcquireBufferForRaster(resource_, 0, 0); 77 raster_buffer_ = provider->AcquireBufferForRaster(resource_, 0, 0);
78 } 78 }
79 void CompleteOnOriginThread(RasterBufferProvider* provider) override { 79 void CompleteOnOriginThread(RasterBufferProvider* provider) override {
80 provider->ReleaseBufferForRaster(std::move(raster_buffer_)); 80 provider->ReleaseBufferForRaster(std::move(raster_buffer_));
81 reply_.Run(!HasFinishedRunning()); 81 reply_.Run(!state().IsFinished());
82 } 82 }
83 83
84 protected: 84 protected:
85 ~TestRasterTaskImpl() override {} 85 ~TestRasterTaskImpl() override {}
86 86
87 private: 87 private:
88 const Resource* resource_; 88 const Resource* resource_;
89 const Reply reply_; 89 const Reply reply_;
90 std::unique_ptr<RasterBuffer> raster_buffer_; 90 std::unique_ptr<RasterBuffer> raster_buffer_;
91 scoped_refptr<RasterSource> raster_source_; 91 scoped_refptr<RasterSource> raster_source_;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 369 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
370 TileTaskWorkerPoolTest, 370 TileTaskWorkerPoolTest,
371 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 371 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
372 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 372 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
373 TILE_TASK_WORKER_POOL_TYPE_GPU, 373 TILE_TASK_WORKER_POOL_TYPE_GPU,
374 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 374 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
375 375
376 } // namespace 376 } // namespace
377 } // namespace cc 377 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool_perftest.cc ('k') | cc/tiles/gpu_image_decode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698