| Index: cc/output/renderer_pixeltest.cc.rej
|
| diff --git a/cc/output/renderer_pixeltest.cc.rej b/cc/output/renderer_pixeltest.cc.rej
|
| deleted file mode 100644
|
| index 13d6779a1cfa56c805b76e43522ceeea2e89d19d..0000000000000000000000000000000000000000
|
| --- a/cc/output/renderer_pixeltest.cc.rej
|
| +++ /dev/null
|
| @@ -1,245 +0,0 @@
|
| -diff a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc (rejected hunks)
|
| -@@ -902,243 +901,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBackground) {
|
| - FuzzyPixelOffByOneComparator(true)));
|
| - }
|
| -
|
| --class VideoGLRendererPixelTest : public GLRendererPixelTest {
|
| -- protected:
|
| -- void CreateEdgeBleedPass(media::VideoFrame::Format format,
|
| -- RenderPassList* pass_list) {
|
| -- gfx::Rect rect(200, 200);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- // Scale the video up so that bilinear filtering kicks in to sample more
|
| -- // than just nearest neighbor would.
|
| -- gfx::Transform scale_by_2;
|
| -- scale_by_2.Scale(2.f, 2.f);
|
| -- gfx::Rect half_rect(100, 100);
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(scale_by_2, half_rect, pass.get());
|
| --
|
| -- gfx::Size background_size(200, 200);
|
| -- gfx::Rect green_rect(16, 20, 100, 100);
|
| -- gfx::RectF tex_coord_rect(
|
| -- static_cast<float>(green_rect.x()) / background_size.width(),
|
| -- static_cast<float>(green_rect.y()) / background_size.height(),
|
| -- static_cast<float>(green_rect.width()) / background_size.width(),
|
| -- static_cast<float>(green_rect.height()) / background_size.height());
|
| --
|
| -- // YUV of (149,43,21) should be green (0,255,0) in RGB.
|
| -- // Create a video frame that has a non-green background rect, with a
|
| -- // green sub-rectangle that should be the only thing displayed in
|
| -- // the final image. Bleeding will appear on all four sides of the video
|
| -- // if the tex coords are not clamped.
|
| -- CreateTestYUVVideoDrawQuad_TwoColor(
|
| -- shared_state, format, false, tex_coord_rect, background_size, 0, 0, 0,
|
| -- green_rect, 149, 43, 21, pass.get(), video_resource_updater_.get(),
|
| -- resource_provider_.get());
|
| -- pass_list->push_back(pass.Pass());
|
| -- }
|
| --
|
| -- void SetUp() override {
|
| -- GLRendererPixelTest::SetUp();
|
| -- video_resource_updater_.reset(new VideoResourceUpdater(
|
| -- output_surface_->context_provider(), resource_provider_.get()));
|
| -- }
|
| --
|
| -- scoped_ptr<VideoResourceUpdater> video_resource_updater_;
|
| --};
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, SimpleYUVRect) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12,
|
| -- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
|
| -- pass.get(), video_resource_updater_.get(),
|
| -- rect, resource_provider_.get());
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(
|
| -- this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, OffsetYUVRect) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- // Intentionally sets frame format to I420 for testing coverage.
|
| -- CreateTestYUVVideoDrawQuad_Striped(
|
| -- shared_state, media::VideoFrame::I420, false,
|
| -- gfx::RectF(0.125f, 0.25f, 0.75f, 0.5f), pass.get(),
|
| -- video_resource_updater_.get(), rect, resource_provider_.get());
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(this->RunPixelTest(
|
| -- &pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_offset.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, SimpleYUVRectBlack) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- // In MPEG color range YUV values of (15,128,128) should produce black.
|
| -- CreateTestYUVVideoDrawQuad_Solid(
|
| -- shared_state, media::VideoFrame::YV12, false,
|
| -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
|
| -- video_resource_updater_.get(), rect, resource_provider_.get());
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- // If we didn't get black out of the YUV values above, then we probably have a
|
| -- // color range issue.
|
| -- EXPECT_TRUE(this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("black.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, SimpleYUVJRect) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- // YUV of (149,43,21) should be green (0,255,0) in RGB.
|
| -- CreateTestYUVVideoDrawQuad_Solid(
|
| -- shared_state, media::VideoFrame::YV12J, false,
|
| -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 149, 43, 21, pass.get(),
|
| -- video_resource_updater_.get(), rect, resource_provider_.get());
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("green.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --// Test that a YUV video doesn't bleed outside of its tex coords when the
|
| --// tex coord rect is only a partial subrectangle of the coded contents.
|
| --TEST_F(VideoGLRendererPixelTest, YUVEdgeBleed) {
|
| -- RenderPassList pass_list;
|
| -- CreateEdgeBleedPass(media::VideoFrame::YV12J, &pass_list);
|
| -- EXPECT_TRUE(this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("green.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, YUVAEdgeBleed) {
|
| -- RenderPassList pass_list;
|
| -- CreateEdgeBleedPass(media::VideoFrame::YV12A, &pass_list);
|
| -- EXPECT_TRUE(this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("green.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, SimpleYUVJRectGrey) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- // Dark grey in JPEG color range (in MPEG, this is black).
|
| -- CreateTestYUVVideoDrawQuad_Solid(
|
| -- shared_state, media::VideoFrame::YV12J, false,
|
| -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
|
| -- video_resource_updater_.get(), rect, resource_provider_.get());
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(
|
| -- this->RunPixelTest(&pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("dark_grey.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, SimpleYUVARect) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
|
| -- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
|
| -- pass.get(), video_resource_updater_.get(),
|
| -- rect, resource_provider_.get());
|
| --
|
| -- SolidColorDrawQuad* color_quad =
|
| -- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
|
| -- color_quad->SetNew(shared_state, rect, rect, SK_ColorWHITE, false);
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(this->RunPixelTest(
|
| -- &pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_alpha.png")),
|
| -- FuzzyPixelOffByOneComparator(true)));
|
| --}
|
| --
|
| --TEST_F(VideoGLRendererPixelTest, FullyTransparentYUVARect) {
|
| -- gfx::Rect rect(this->device_viewport_size_);
|
| --
|
| -- RenderPassId id(1, 1);
|
| -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
|
| --
|
| -- SharedQuadState* shared_state =
|
| -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
|
| --
|
| -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
|
| -- true, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
|
| -- pass.get(), video_resource_updater_.get(),
|
| -- rect, resource_provider_.get());
|
| --
|
| -- SolidColorDrawQuad* color_quad =
|
| -- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
|
| -- color_quad->SetNew(shared_state, rect, rect, SK_ColorBLACK, false);
|
| --
|
| -- RenderPassList pass_list;
|
| -- pass_list.push_back(pass.Pass());
|
| --
|
| -- EXPECT_TRUE(this->RunPixelTest(
|
| -- &pass_list,
|
| -- base::FilePath(FILE_PATH_LITERAL("black.png")),
|
| -- ExactPixelComparator(true)));
|
| --}
|
| --
|
| - TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) {
|
| - gfx::Rect viewport_rect(this->device_viewport_size_);
|
| -
|
|
|