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

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

Issue 1888713002: cc: Merge TileTaskRunner to TileTaskWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_tile_task_client
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
« no previous file with comments | « cc/raster/tile_task.h ('k') | cc/raster/tile_task_runner.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_runner.h" 5 #include "cc/raster/tile_task.h"
6 #include "cc/resources/platform_color.h" 6
7 #include "base/logging.h"
7 8
8 namespace cc { 9 namespace cc {
9 10
10 TileTask::TileTask(bool supports_concurrent_execution) 11 TileTask::TileTask(bool supports_concurrent_execution)
11 : supports_concurrent_execution_(supports_concurrent_execution), 12 : supports_concurrent_execution_(supports_concurrent_execution),
12 did_schedule_(false), 13 did_schedule_(false),
13 did_complete_(false) {} 14 did_complete_(false) {}
14 15
15 TileTask::TileTask(bool supports_concurrent_execution, 16 TileTask::TileTask(bool supports_concurrent_execution,
16 TileTask::Vector* dependencies) 17 TileTask::Vector* dependencies)
(...skipping 28 matching lines...) Expand all
45 DCHECK(did_schedule_); 46 DCHECK(did_schedule_);
46 DCHECK(!did_complete_); 47 DCHECK(!did_complete_);
47 did_schedule_ = false; 48 did_schedule_ = false;
48 did_complete_ = true; 49 did_complete_ = true;
49 } 50 }
50 51
51 bool TileTask::HasCompleted() const { 52 bool TileTask::HasCompleted() const {
52 return did_complete_; 53 return did_complete_;
53 } 54 }
54 55
55 bool TileTaskRunner::ResourceFormatRequiresSwizzle(ResourceFormat format) {
56 switch (format) {
57 case RGBA_8888:
58 case BGRA_8888:
59 // Initialize resource using the preferred PlatformColor component
60 // order and swizzle in the shader instead of in software.
61 return !PlatformColor::SameComponentOrder(format);
62 case RGBA_4444:
63 case ETC1:
64 case ALPHA_8:
65 case LUMINANCE_8:
66 case RGB_565:
67 case RED_8:
68 case LUMINANCE_F16:
69 return false;
70 }
71 NOTREACHED();
72 return false;
73 }
74
75 } // namespace cc 56 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task.h ('k') | cc/raster/tile_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698