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

Unified Diff: cc/tiles/tile_manager.h

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Remove damage Created 4 years, 3 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/test/fake_tile_manager_client.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.h
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index 3510c20ddd8571001715dbe1cc25d525454829a0..fa8e5f765a0acd8e1ed95e7377476c2c0afe0410 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -76,6 +76,9 @@ class CC_EXPORT TileManagerClient {
// draw. This can be used to preemptively start a frame.
virtual void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) = 0;
+ // Requests the color space into which tiles should be rasterized.
+ virtual gfx::ColorSpace GetTileColorSpace() const = 0;
+
protected:
virtual ~TileManagerClient() {}
};
@@ -148,7 +151,8 @@ class CC_EXPORT TileManager {
TileDrawInfo& draw_info = tiles[i]->draw_info();
draw_info.resource_ = resource_pool_->AcquireResource(
tiles[i]->desired_texture_size(),
- raster_buffer_provider_->GetResourceFormat(false), gfx::ColorSpace());
+ raster_buffer_provider_->GetResourceFormat(false),
+ client_->GetTileColorSpace());
}
}
@@ -257,7 +261,8 @@ class CC_EXPORT TileManager {
void FreeResourcesForTile(Tile* tile);
void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile);
scoped_refptr<TileTask> CreateRasterTask(
- const PrioritizedTile& prioritized_tile);
+ const PrioritizedTile& prioritized_tile,
+ const gfx::ColorSpace& color_space);
std::unique_ptr<EvictionTilePriorityQueue>
FreeTileResourcesUntilUsageIsWithinLimit(
« no previous file with comments | « cc/test/fake_tile_manager_client.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698