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

Unified Diff: cc/raster/tile_task_runner.cc

Issue 1890903002: cc: Simplify Task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_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 side-by-side diff with in-line comments
Download patch
Index: cc/raster/tile_task_runner.cc
diff --git a/cc/raster/tile_task_runner.cc b/cc/raster/tile_task_runner.cc
index e76218c19e9484e6e30eff2ee23f12578c4c8495..fde8ad800e3f163af2b71891b4e1d065b49732c7 100644
--- a/cc/raster/tile_task_runner.cc
+++ b/cc/raster/tile_task_runner.cc
@@ -7,8 +7,17 @@
namespace cc {
-TileTask::TileTask() : did_schedule_(false), did_complete_(false) {
-}
+TileTask::TileTask(bool supports_concurrent_execution)
+ : supports_concurrent_execution_(supports_concurrent_execution),
+ did_schedule_(false),
+ did_complete_(false) {}
+
+TileTask::TileTask(bool supports_concurrent_execution,
+ TileTask::Vector* dependencies)
+ : supports_concurrent_execution_(supports_concurrent_execution),
+ dependencies_(std::move(*dependencies)),
+ did_schedule_(false),
+ did_complete_(false) {}
TileTask::~TileTask() {
DCHECK(!did_schedule_);
@@ -43,26 +52,6 @@ bool TileTask::HasCompleted() const {
return did_complete_;
}
-ImageDecodeTask::ImageDecodeTask() {
-}
-
-ImageDecodeTask::ImageDecodeTask(scoped_refptr<ImageDecodeTask> dependency)
- : dependency_(std::move(dependency)) {}
-
-ImageDecodeTask::~ImageDecodeTask() {
-}
-
-bool ImageDecodeTask::SupportsConcurrentExecution() const {
- return true;
-}
-
-RasterTask::RasterTask(ImageDecodeTask::Vector* dependencies) {
- dependencies_.swap(*dependencies);
-}
-
-RasterTask::~RasterTask() {
-}
-
bool TileTaskRunner::ResourceFormatRequiresSwizzle(ResourceFormat format) {
switch (format) {
case RGBA_8888:

Powered by Google App Engine
This is Rietveld 408576698