| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void TearDown() override { | 131 void TearDown() override { |
| 132 GLRendererPixelTest::TearDown(); | 132 GLRendererPixelTest::TearDown(); |
| 133 ASSERT_FALSE(renderer()->IsContextLost()); | 133 ASSERT_FALSE(renderer()->IsContextLost()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void TestShader(const ProgramKey& program_key) { | 136 void TestShader(const ProgramKey& program_key) { |
| 137 renderer()->SetCurrentFrameForTesting(GLRenderer::DrawingFrame()); | 137 renderer()->SetCurrentFrameForTesting(GLRenderer::DrawingFrame()); |
| 138 const size_t kNumSrcColorSpaces = 4; | 138 const size_t kNumSrcColorSpaces = 4; |
| 139 gfx::ColorSpace src_color_spaces[kNumSrcColorSpaces] = { | 139 gfx::ColorSpace src_color_spaces[kNumSrcColorSpaces] = { |
| 140 gfx::ColorSpace(), gfx::ColorSpace::CreateSRGB(), | 140 gfx::ColorSpace(), gfx::ColorSpace::CreateSRGB(), |
| 141 gfx::ColorSpace::CreateREC709(), | 141 gfx::ColorSpace::CreateREC709(), gfx::ColorSpace::CreateExtendedSRGB(), |
| 142 }; | 142 }; |
| 143 const size_t kNumDstColorSpaces = 3; | 143 const size_t kNumDstColorSpaces = 3; |
| 144 gfx::ColorSpace dst_color_spaces[kNumDstColorSpaces] = { | 144 gfx::ColorSpace dst_color_spaces[kNumDstColorSpaces] = { |
| 145 gfx::ColorSpace(), gfx::ColorSpace::CreateSRGB(), | 145 gfx::ColorSpace(), gfx::ColorSpace::CreateSRGB(), |
| 146 gfx::ColorSpace::CreateSCRGBLinear(), | 146 gfx::ColorSpace::CreateSCRGBLinear(), |
| 147 }; | 147 }; |
| 148 for (size_t i = 0; i < kNumDstColorSpaces; ++i) { | 148 for (size_t i = 0; i < kNumDstColorSpaces; ++i) { |
| 149 for (size_t j = 0; j < kNumSrcColorSpaces; ++j) { | 149 for (size_t j = 0; j < kNumSrcColorSpaces; ++j) { |
| 150 renderer()->SetUseProgram(program_key, src_color_spaces[j], | 150 renderer()->SetUseProgram(program_key, src_color_spaces[j], |
| 151 dst_color_spaces[i]); | 151 dst_color_spaces[i]); |
| (...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 renderer_->SetVisible(true); | 2052 renderer_->SetVisible(true); |
| 2053 Mock::VerifyAndClearExpectations(context_support_ptr_); | 2053 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 2054 | 2054 |
| 2055 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); | 2055 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); |
| 2056 renderer_->SetVisible(false); | 2056 renderer_->SetVisible(false); |
| 2057 Mock::VerifyAndClearExpectations(context_support_ptr_); | 2057 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 } // namespace | 2060 } // namespace |
| 2061 } // namespace cc | 2061 } // namespace cc |
| OLD | NEW |