OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdint.h> |
| 6 |
| 7 #include "base/macros.h" |
5 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
6 #include "gpu/GLES2/gl2extchromium.h" | 9 #include "gpu/GLES2/gl2extchromium.h" |
7 #include "gpu/command_buffer/client/gles2_interface_stub.h" | 10 #include "gpu/command_buffer/client/gles2_interface_stub.h" |
8 #include "media/base/timestamp_constants.h" | 11 #include "media/base/timestamp_constants.h" |
9 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
10 #include "media/base/video_util.h" | 13 #include "media/base/video_util.h" |
11 #include "media/renderers/skcanvas_video_renderer.h" | 14 #include "media/renderers/skcanvas_video_renderer.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/libyuv/include/libyuv/convert.h" | 16 #include "third_party/libyuv/include/libyuv/convert.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 17 #include "third_party/skia/include/core/SkCanvas.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 gpu::MailboxHolder mailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), | 496 gpu::MailboxHolder mailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), |
494 GL_TEXTURE_RECTANGLE_ARB); | 497 GL_TEXTURE_RECTANGLE_ARB); |
495 auto video_frame = VideoFrame::WrapNativeTexture( | 498 auto video_frame = VideoFrame::WrapNativeTexture( |
496 PIXEL_FORMAT_UYVY, mailbox, base::Bind(MailboxHoldersReleased), size, | 499 PIXEL_FORMAT_UYVY, mailbox, base::Bind(MailboxHoldersReleased), size, |
497 gfx::Rect(size), size, kNoTimestamp()); | 500 gfx::Rect(size), size, kNoTimestamp()); |
498 | 501 |
499 renderer_.Paint(video_frame, &canvas, kNaturalRect, 0xFF, | 502 renderer_.Paint(video_frame, &canvas, kNaturalRect, 0xFF, |
500 SkXfermode::kSrcOver_Mode, VIDEO_ROTATION_90, context_3d); | 503 SkXfermode::kSrcOver_Mode, VIDEO_ROTATION_90, context_3d); |
501 } | 504 } |
502 } // namespace media | 505 } // namespace media |
OLD | NEW |