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

Side by Side Diff: cc/output/renderer_pixeltest.cc

Issue 2763223003: Reland of cc: Don't use StreamVideoDrawQuad on any platform but Android. (Closed)
Patch Set: Fix tests. 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
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/aligned_memory.h" 9 #include "base/memory/aligned_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 gfx::Rect quad_rect_; 909 gfx::Rect quad_rect_;
910 RenderPassList pass_list_; 910 RenderPassList pass_list_;
911 }; 911 };
912 912
913 template <typename TypeParam> 913 template <typename TypeParam>
914 class IntersectingQuadGLPixelTest 914 class IntersectingQuadGLPixelTest
915 : public IntersectingQuadPixelTest<TypeParam> { 915 : public IntersectingQuadPixelTest<TypeParam> {
916 public: 916 public:
917 void SetUp() override { 917 void SetUp() override {
918 IntersectingQuadPixelTest<TypeParam>::SetUp(); 918 IntersectingQuadPixelTest<TypeParam>::SetUp();
919 video_resource_updater_.reset( 919 bool use_stream_video_draw_quad = false;
920 new VideoResourceUpdater(this->output_surface_->context_provider(), 920 video_resource_updater_.reset(new VideoResourceUpdater(
921 this->resource_provider_.get())); 921 this->output_surface_->context_provider(),
922 video_resource_updater2_.reset( 922 this->resource_provider_.get(), use_stream_video_draw_quad));
923 new VideoResourceUpdater(this->output_surface_->context_provider(), 923 video_resource_updater2_.reset(new VideoResourceUpdater(
924 this->resource_provider_.get())); 924 this->output_surface_->context_provider(),
925 this->resource_provider_.get(), use_stream_video_draw_quad));
925 } 926 }
926 927
927 protected: 928 protected:
928 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; 929 std::unique_ptr<VideoResourceUpdater> video_resource_updater_;
929 std::unique_ptr<VideoResourceUpdater> video_resource_updater2_; 930 std::unique_ptr<VideoResourceUpdater> video_resource_updater2_;
930 }; 931 };
931 932
932 template <typename TypeParam> 933 template <typename TypeParam>
933 class IntersectingQuadSoftwareTest 934 class IntersectingQuadSoftwareTest
934 : public IntersectingQuadPixelTest<TypeParam> {}; 935 : public IntersectingQuadPixelTest<TypeParam> {};
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 CreateTestYUVVideoDrawQuad_TwoColor( 1236 CreateTestYUVVideoDrawQuad_TwoColor(
1236 shared_state, format, color_space, false, tex_coord_rect, 1237 shared_state, format, color_space, false, tex_coord_rect,
1237 background_size, gfx::Rect(background_size), 128, 128, 128, green_rect, 1238 background_size, gfx::Rect(background_size), 128, 128, 128, green_rect,
1238 149, 43, 21, pass.get(), video_resource_updater_.get(), 1239 149, 43, 21, pass.get(), video_resource_updater_.get(),
1239 resource_provider_.get()); 1240 resource_provider_.get());
1240 pass_list->push_back(std::move(pass)); 1241 pass_list->push_back(std::move(pass));
1241 } 1242 }
1242 1243
1243 void SetUp() override { 1244 void SetUp() override {
1244 GLRendererPixelTest::SetUp(); 1245 GLRendererPixelTest::SetUp();
1246 bool use_stream_video_draw_quad = false;
1245 video_resource_updater_.reset(new VideoResourceUpdater( 1247 video_resource_updater_.reset(new VideoResourceUpdater(
1246 output_surface_->context_provider(), resource_provider_.get())); 1248 output_surface_->context_provider(), resource_provider_.get(),
1249 use_stream_video_draw_quad));
1247 } 1250 }
1248 1251
1249 std::unique_ptr<VideoResourceUpdater> video_resource_updater_; 1252 std::unique_ptr<VideoResourceUpdater> video_resource_updater_;
1250 }; 1253 };
1251 1254
1252 class VideoGLRendererPixelHiLoTest 1255 class VideoGLRendererPixelHiLoTest
1253 : public VideoGLRendererPixelTest, 1256 : public VideoGLRendererPixelTest,
1254 public ::testing::WithParamInterface<bool> {}; 1257 public ::testing::WithParamInterface<bool> {};
1255 1258
1256 TEST_P(VideoGLRendererPixelHiLoTest, SimpleYUVRect) { 1259 TEST_P(VideoGLRendererPixelHiLoTest, SimpleYUVRect) {
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 INSTANTIATE_TEST_CASE_P( 3553 INSTANTIATE_TEST_CASE_P(
3551 ToColorSpace, 3554 ToColorSpace,
3552 ColorTransformPixelTest, 3555 ColorTransformPixelTest,
3553 testing::Combine(testing::ValuesIn(intermediate_color_spaces), 3556 testing::Combine(testing::ValuesIn(intermediate_color_spaces),
3554 testing::ValuesIn(dst_color_spaces))); 3557 testing::ValuesIn(dst_color_spaces)));
3555 3558
3556 #endif // !defined(OS_ANDROID) 3559 #endif // !defined(OS_ANDROID)
3557 3560
3558 } // namespace 3561 } // namespace
3559 } // namespace cc 3562 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698