| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 12450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12461 if (tile->tiling_i_index() < 2 && tile->tiling_j_index() < 2) | 12461 if (tile->tiling_i_index() < 2 && tile->tiling_j_index() < 2) |
| 12462 EXPECT_TRUE(tile->HasRasterTask()); | 12462 EXPECT_TRUE(tile->HasRasterTask()); |
| 12463 else | 12463 else |
| 12464 EXPECT_FALSE(tile->HasRasterTask()); | 12464 EXPECT_FALSE(tile->HasRasterTask()); |
| 12465 } | 12465 } |
| 12466 Region expected_invalidation( | 12466 Region expected_invalidation( |
| 12467 raster_source->GetRectForImage(checkerable_image.stable_id())); | 12467 raster_source->GetRectForImage(checkerable_image.stable_id())); |
| 12468 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 12468 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); |
| 12469 } | 12469 } |
| 12470 | 12470 |
| 12471 TEST_F(LayerTreeHostImplTest, RasterColorSpaceNoColorCorrection) { |
| 12472 LayerTreeSettings settings = DefaultSettings(); |
| 12473 CreateHostImpl(settings, CreateCompositorFrameSink()); |
| 12474 EXPECT_FALSE(host_impl_->GetRasterColorSpace().IsValid()); |
| 12475 } |
| 12476 |
| 12477 TEST_F(LayerTreeHostImplTest, RasterColorSpace) { |
| 12478 LayerTreeSettings settings = DefaultSettings(); |
| 12479 settings.enable_color_correct_rasterization = true; |
| 12480 CreateHostImpl(settings, CreateCompositorFrameSink()); |
| 12481 EXPECT_EQ(host_impl_->GetRasterColorSpace(), gfx::ColorSpace::CreateSRGB()); |
| 12482 } |
| 12483 |
| 12471 } // namespace | 12484 } // namespace |
| 12472 } // namespace cc | 12485 } // namespace cc |
| OLD | NEW |