| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 gfx::Rect quad_rect_; | 908 gfx::Rect quad_rect_; |
| 909 RenderPassList pass_list_; | 909 RenderPassList pass_list_; |
| 910 }; | 910 }; |
| 911 | 911 |
| 912 template <typename TypeParam> | 912 template <typename TypeParam> |
| 913 class IntersectingQuadGLPixelTest | 913 class IntersectingQuadGLPixelTest |
| 914 : public IntersectingQuadPixelTest<TypeParam> { | 914 : public IntersectingQuadPixelTest<TypeParam> { |
| 915 public: | 915 public: |
| 916 void SetUp() override { | 916 void SetUp() override { |
| 917 IntersectingQuadPixelTest<TypeParam>::SetUp(); | 917 IntersectingQuadPixelTest<TypeParam>::SetUp(); |
| 918 bool use_stream_video_draw_quad = false; | 918 video_resource_updater_.reset( |
| 919 video_resource_updater_.reset(new VideoResourceUpdater( | 919 new VideoResourceUpdater(this->output_surface_->context_provider(), |
| 920 this->output_surface_->context_provider(), | 920 this->resource_provider_.get())); |
| 921 this->resource_provider_.get(), use_stream_video_draw_quad)); | 921 video_resource_updater2_.reset( |
| 922 video_resource_updater2_.reset(new VideoResourceUpdater( | 922 new VideoResourceUpdater(this->output_surface_->context_provider(), |
| 923 this->output_surface_->context_provider(), | 923 this->resource_provider_.get())); |
| 924 this->resource_provider_.get(), use_stream_video_draw_quad)); | |
| 925 } | 924 } |
| 926 | 925 |
| 927 protected: | 926 protected: |
| 928 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; | 927 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; |
| 929 std::unique_ptr<VideoResourceUpdater> video_resource_updater2_; | 928 std::unique_ptr<VideoResourceUpdater> video_resource_updater2_; |
| 930 }; | 929 }; |
| 931 | 930 |
| 932 template <typename TypeParam> | 931 template <typename TypeParam> |
| 933 class IntersectingQuadSoftwareTest | 932 class IntersectingQuadSoftwareTest |
| 934 : public IntersectingQuadPixelTest<TypeParam> {}; | 933 : public IntersectingQuadPixelTest<TypeParam> {}; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 CreateTestYUVVideoDrawQuad_TwoColor( | 1234 CreateTestYUVVideoDrawQuad_TwoColor( |
| 1236 shared_state, format, color_space, false, tex_coord_rect, | 1235 shared_state, format, color_space, false, tex_coord_rect, |
| 1237 background_size, gfx::Rect(background_size), 128, 128, 128, green_rect, | 1236 background_size, gfx::Rect(background_size), 128, 128, 128, green_rect, |
| 1238 149, 43, 21, pass.get(), video_resource_updater_.get(), | 1237 149, 43, 21, pass.get(), video_resource_updater_.get(), |
| 1239 resource_provider_.get()); | 1238 resource_provider_.get()); |
| 1240 pass_list->push_back(std::move(pass)); | 1239 pass_list->push_back(std::move(pass)); |
| 1241 } | 1240 } |
| 1242 | 1241 |
| 1243 void SetUp() override { | 1242 void SetUp() override { |
| 1244 GLRendererPixelTest::SetUp(); | 1243 GLRendererPixelTest::SetUp(); |
| 1245 bool use_stream_video_draw_quad = false; | |
| 1246 video_resource_updater_.reset(new VideoResourceUpdater( | 1244 video_resource_updater_.reset(new VideoResourceUpdater( |
| 1247 output_surface_->context_provider(), resource_provider_.get(), | 1245 output_surface_->context_provider(), resource_provider_.get())); |
| 1248 use_stream_video_draw_quad)); | |
| 1249 } | 1246 } |
| 1250 | 1247 |
| 1251 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; | 1248 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; |
| 1252 }; | 1249 }; |
| 1253 | 1250 |
| 1254 class VideoGLRendererPixelHiLoTest | 1251 class VideoGLRendererPixelHiLoTest |
| 1255 : public VideoGLRendererPixelTest, | 1252 : public VideoGLRendererPixelTest, |
| 1256 public ::testing::WithParamInterface<bool> {}; | 1253 public ::testing::WithParamInterface<bool> {}; |
| 1257 | 1254 |
| 1258 TEST_P(VideoGLRendererPixelHiLoTest, SimpleYUVRect) { | 1255 TEST_P(VideoGLRendererPixelHiLoTest, SimpleYUVRect) { |
| (...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3552 INSTANTIATE_TEST_CASE_P( | 3549 INSTANTIATE_TEST_CASE_P( |
| 3553 ToColorSpace, | 3550 ToColorSpace, |
| 3554 ColorTransformPixelTest, | 3551 ColorTransformPixelTest, |
| 3555 testing::Combine(testing::ValuesIn(intermediate_color_spaces), | 3552 testing::Combine(testing::ValuesIn(intermediate_color_spaces), |
| 3556 testing::ValuesIn(dst_color_spaces))); | 3553 testing::ValuesIn(dst_color_spaces))); |
| 3557 | 3554 |
| 3558 #endif // !defined(OS_ANDROID) | 3555 #endif // !defined(OS_ANDROID) |
| 3559 | 3556 |
| 3560 } // namespace | 3557 } // namespace |
| 3561 } // namespace cc | 3558 } // namespace cc |
| OLD | NEW |