| 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "cc/layers/append_quads_data.h" | 6 #include "cc/layers/append_quads_data.h" |
| 7 #include "cc/output/gl_renderer.h" | 7 #include "cc/output/gl_renderer.h" |
| 8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
| 9 #include "cc/quads/picture_draw_quad.h" | 9 #include "cc/quads/picture_draw_quad.h" |
| 10 #include "cc/quads/texture_draw_quad.h" | 10 #include "cc/quads/texture_draw_quad.h" |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 ResourceProvider::ResourceId a_resource = 0; | 508 ResourceProvider::ResourceId a_resource = 0; |
| 509 if (with_alpha) { | 509 if (with_alpha) { |
| 510 a_resource = resource_provider_->CreateResourceFromTextureMailbox( | 510 a_resource = resource_provider_->CreateResourceFromTextureMailbox( |
| 511 resources.mailboxes[media::VideoFrame::kAPlane], | 511 resources.mailboxes[media::VideoFrame::kAPlane], |
| 512 SingleReleaseCallbackImpl::Create( | 512 SingleReleaseCallbackImpl::Create( |
| 513 resources.release_callbacks[media::VideoFrame::kAPlane])); | 513 resources.release_callbacks[media::VideoFrame::kAPlane])); |
| 514 } | 514 } |
| 515 | 515 |
| 516 YUVVideoDrawQuad* yuv_quad = | 516 YUVVideoDrawQuad* yuv_quad = |
| 517 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 517 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
| 518 yuv_quad->SetNew(shared_state, | 518 yuv_quad->SetNew(shared_state, rect, opaque_rect, rect, tex_coord_rect, |
| 519 rect, | 519 gfx::SizeF(1.f, 1.f), y_resource, u_resource, v_resource, |
| 520 opaque_rect, | 520 a_resource, color_space); |
| 521 rect, | |
| 522 tex_coord_rect, | |
| 523 y_resource, | |
| 524 u_resource, | |
| 525 v_resource, | |
| 526 a_resource, | |
| 527 color_space); | |
| 528 } | 521 } |
| 529 | 522 |
| 530 void SetUp() override { | 523 void SetUp() override { |
| 531 GLRendererPixelTest::SetUp(); | 524 GLRendererPixelTest::SetUp(); |
| 532 video_resource_updater_.reset(new VideoResourceUpdater( | 525 video_resource_updater_.reset(new VideoResourceUpdater( |
| 533 output_surface_->context_provider(), resource_provider_.get())); | 526 output_surface_->context_provider(), resource_provider_.get())); |
| 534 } | 527 } |
| 535 | 528 |
| 536 private: | 529 private: |
| 537 scoped_ptr<VideoResourceUpdater> video_resource_updater_; | 530 scoped_ptr<VideoResourceUpdater> video_resource_updater_; |
| (...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2419 EXPECT_TRUE(this->RunPixelTest( | 2412 EXPECT_TRUE(this->RunPixelTest( |
| 2420 &pass_list, | 2413 &pass_list, |
| 2421 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), | 2414 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), |
| 2422 FuzzyPixelOffByOneComparator(true))); | 2415 FuzzyPixelOffByOneComparator(true))); |
| 2423 } | 2416 } |
| 2424 | 2417 |
| 2425 #endif // !defined(OS_ANDROID) | 2418 #endif // !defined(OS_ANDROID) |
| 2426 | 2419 |
| 2427 } // namespace | 2420 } // namespace |
| 2428 } // namespace cc | 2421 } // namespace cc |
| OLD | NEW |