Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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() |
|
hubbe
2017/06/23 21:31:52
Can we just DCHECK() instead?
ccameron
2017/06/23 22:44:10
There's the question: "Suppose we can't parse a di
| |
| 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 |
| OLD | NEW |