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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: Use forced color profile in display::Display ctor Created 3 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 unified diff | Download patch
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/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 auto it = previous_contained_surfaces_.find(surface_id); 931 auto it = previous_contained_surfaces_.find(surface_id);
932 if (it == previous_contained_surfaces_.end()) 932 if (it == previous_contained_surfaces_.end())
933 return; 933 return;
934 // Set the last drawn index as 0 to ensure full damage next time it's drawn. 934 // Set the last drawn index as 0 to ensure full damage next time it's drawn.
935 it->second = 0; 935 it->second = 0;
936 } 936 }
937 937
938 void SurfaceAggregator::SetOutputColorSpace( 938 void SurfaceAggregator::SetOutputColorSpace(
939 const gfx::ColorSpace& blending_color_space, 939 const gfx::ColorSpace& blending_color_space,
940 const gfx::ColorSpace& output_color_space) { 940 const gfx::ColorSpace& output_color_space) {
941 blending_color_space_ = blending_color_space; 941 blending_color_space_ = blending_color_space.IsValid()
942 output_color_space_ = output_color_space; 942 ? blending_color_space
943 : gfx::ColorSpace::CreateSRGB();
944 output_color_space_ = output_color_space.IsValid()
945 ? output_color_space
946 : gfx::ColorSpace::CreateSRGB();
943 } 947 }
944 948
945 } // namespace cc 949 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator.h ('k') | content/browser/renderer_host/browser_compositor_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698