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

Unified Diff: cc/quads/render_pass_unittest.cc

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix typo Created 3 years, 10 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/quads/render_pass_unittest.cc
diff --git a/cc/quads/render_pass_unittest.cc b/cc/quads/render_pass_unittest.cc
index 3854471e82e2bfa958dfd818bd918f570ae96675..3587a4d56e159c75d8d0f077c3994327ef5be43c 100644
--- a/cc/quads/render_pass_unittest.cc
+++ b/cc/quads/render_pass_unittest.cc
@@ -28,6 +28,7 @@ struct RenderPassSize {
gfx::Transform transform_to_root_target;
FilterOperations filters;
FilterOperations background_filters;
+ gfx::ColorSpace color_space;
bool has_transparent_background;
std::vector<std::unique_ptr<CopyOutputRequest>> copy_callbacks;
QuadList quad_list;
@@ -76,11 +77,12 @@ TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) {
filters.Append(FilterOperation::CreateOpacityFilter(0.5));
FilterOperations background_filters;
background_filters.Append(FilterOperation::CreateInvertFilter(1.0));
+ gfx::ColorSpace color_space = gfx::ColorSpace::CreateSRGB();
bool has_transparent_background = true;
std::unique_ptr<RenderPass> pass = RenderPass::Create();
pass->SetAll(id, output_rect, damage_rect, transform_to_root, filters,
- background_filters, has_transparent_background);
+ background_filters, color_space, has_transparent_background);
pass->copy_requests.push_back(CopyOutputRequest::CreateEmptyRequest());
// Stick a quad in the pass, this should not get copied.
@@ -124,11 +126,12 @@ TEST(RenderPassTest, CopyAllShouldBeIdentical) {
filters.Append(FilterOperation::CreateOpacityFilter(0.5));
FilterOperations background_filters;
background_filters.Append(FilterOperation::CreateInvertFilter(1.0));
+ gfx::ColorSpace color_space = gfx::ColorSpace::CreateXYZD50();
bool has_transparent_background = true;
std::unique_ptr<RenderPass> pass = RenderPass::Create();
pass->SetAll(id, output_rect, damage_rect, transform_to_root, filters,
- background_filters, has_transparent_background);
+ background_filters, color_space, has_transparent_background);
// Two quads using one shared state.
SharedQuadState* shared_state1 = pass->CreateAndAppendSharedQuadState();
@@ -174,12 +177,13 @@ TEST(RenderPassTest, CopyAllShouldBeIdentical) {
contrib_filters.Append(FilterOperation::CreateSepiaFilter(0.5));
FilterOperations contrib_background_filters;
contrib_background_filters.Append(FilterOperation::CreateSaturateFilter(1));
+ gfx::ColorSpace contrib_color_space = gfx::ColorSpace::CreateSCRGBLinear();
bool contrib_has_transparent_background = true;
std::unique_ptr<RenderPass> contrib = RenderPass::Create();
contrib->SetAll(contrib_id, contrib_output_rect, contrib_damage_rect,
contrib_transform_to_root, contrib_filters,
- contrib_background_filters,
+ contrib_background_filters, contrib_color_space,
contrib_has_transparent_background);
SharedQuadState* contrib_shared_state =
@@ -222,11 +226,12 @@ TEST(RenderPassTest, CopyAllWithCulledQuads) {
filters.Append(FilterOperation::CreateOpacityFilter(0.5));
FilterOperations background_filters;
background_filters.Append(FilterOperation::CreateInvertFilter(1.0));
+ gfx::ColorSpace color_space = gfx::ColorSpace::CreateSCRGBLinear();
bool has_transparent_background = true;
std::unique_ptr<RenderPass> pass = RenderPass::Create();
pass->SetAll(id, output_rect, damage_rect, transform_to_root, filters,
- background_filters, has_transparent_background);
+ background_filters, color_space, has_transparent_background);
// A shared state with a quad.
SharedQuadState* shared_state1 = pass->CreateAndAppendSharedQuadState();
« cc/ipc/cc_param_traits.cc ('K') | « cc/quads/render_pass.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698