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

Unified Diff: cc/raster/pixel_buffer_tile_task_worker_pool.cc

Issue 1197423003: Remaining code for basic tile compression functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable tile compression for one copy Created 5 years, 6 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/pixel_buffer_tile_task_worker_pool.cc
diff --git a/cc/raster/pixel_buffer_tile_task_worker_pool.cc b/cc/raster/pixel_buffer_tile_task_worker_pool.cc
index df79519485d8d3ee1b1301e24b699c235467c81b..de2c0ddf8e2398e5f751b2d61de6bd43abaa1e85 100644
--- a/cc/raster/pixel_buffer_tile_task_worker_pool.cc
+++ b/cc/raster/pixel_buffer_tile_task_worker_pool.cc
@@ -313,12 +313,18 @@ void PixelBufferTileTaskWorkerPool::CheckForCompletedTasks() {
completed_raster_tasks_.clear();
}
-ResourceFormat PixelBufferTileTaskWorkerPool::GetResourceFormat() const {
- return resource_provider_->memory_efficient_texture_format();
+ResourceFormat PixelBufferTileTaskWorkerPool::GetResourceFormat(
+ bool must_be_noncompressed,
+ bool must_support_alpha) const {
+ return resource_provider_->memory_efficient_texture_format(
+ must_be_noncompressed, must_support_alpha);
}
-bool PixelBufferTileTaskWorkerPool::GetResourceRequiresSwizzle() const {
- return !PlatformColor::SameComponentOrder(GetResourceFormat());
+bool PixelBufferTileTaskWorkerPool::GetResourceRequiresSwizzle(
+ bool must_be_noncompressed,
+ bool must_support_alpha) const {
+ return !PlatformColor::SameComponentOrder(
+ GetResourceFormat(must_be_noncompressed, must_support_alpha));
}
scoped_ptr<RasterBuffer> PixelBufferTileTaskWorkerPool::AcquireBufferForRaster(

Powered by Google App Engine
This is Rietveld 408576698