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

Unified Diff: cc/raster/tile_task_worker_pool.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/raster/tile_task_worker_pool.h ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/tile_task_worker_pool.cc
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index 1e419420208209cef4577eace927e62430f91a72..b14cd8363c8e0be6a9be26c84de379f81b5fb024 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -9,6 +9,7 @@
#include "base/trace_event/trace_event.h"
#include "cc/playback/raster_source.h"
#include "cc/raster/texture_compressor.h"
+#include "cc/resources/platform_color.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkSurface.h"
@@ -145,4 +146,24 @@ void TileTaskWorkerPool::PlaybackToMemory(
NOTREACHED();
}
+bool TileTaskWorkerPool::ResourceFormatRequiresSwizzle(ResourceFormat format) {
+ switch (format) {
+ case RGBA_8888:
+ case BGRA_8888:
+ // Initialize resource using the preferred PlatformColor component
+ // order and swizzle in the shader instead of in software.
+ return !PlatformColor::SameComponentOrder(format);
+ case RGBA_4444:
+ case ETC1:
+ case ALPHA_8:
+ case LUMINANCE_8:
+ case RGB_565:
+ case RED_8:
+ case LUMINANCE_F16:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+}
+
} // namespace cc
« no previous file with comments | « cc/raster/tile_task_worker_pool.h ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698