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 <GLES3/gl3.h> | 5 #include <GLES3/gl3.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
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" |
11 #include "cc/paint/paint_canvas.h" | |
12 #include "cc/paint/paint_flags.h" | 11 #include "cc/paint/paint_flags.h" |
13 #include "cc/paint/paint_surface.h" | 12 #include "cc/paint/skia_paint_canvas.h" |
14 #include "gpu/GLES2/gl2extchromium.h" | 13 #include "gpu/GLES2/gl2extchromium.h" |
15 #include "gpu/command_buffer/client/gles2_interface_stub.h" | 14 #include "gpu/command_buffer/client/gles2_interface_stub.h" |
16 #include "media/base/timestamp_constants.h" | 15 #include "media/base/timestamp_constants.h" |
17 #include "media/base/video_frame.h" | 16 #include "media/base/video_frame.h" |
18 #include "media/base/video_util.h" | 17 #include "media/base/video_util.h" |
19 #include "media/renderers/skcanvas_video_renderer.h" | 18 #include "media/renderers/skcanvas_video_renderer.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "third_party/libyuv/include/libyuv/convert.h" | 20 #include "third_party/libyuv/include/libyuv/convert.h" |
22 #include "third_party/skia/include/core/SkImage.h" | 21 #include "third_party/skia/include/core/SkImage.h" |
23 #include "third_party/skia/include/core/SkRefCnt.h" | 22 #include "third_party/skia/include/core/SkRefCnt.h" |
| 23 #include "third_party/skia/include/core/SkSurface.h" |
24 #include "third_party/skia/include/gpu/GrContext.h" | 24 #include "third_party/skia/include/gpu/GrContext.h" |
25 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 25 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
26 #include "ui/gfx/geometry/rect_f.h" | 26 #include "ui/gfx/geometry/rect_f.h" |
27 | 27 |
28 using media::VideoFrame; | 28 using media::VideoFrame; |
29 | 29 |
30 namespace media { | 30 namespace media { |
31 | 31 |
32 static const int kWidth = 320; | 32 static const int kWidth = 320; |
33 static const int kHeight = 240; | 33 static const int kHeight = 240; |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 EXPECT_EQ(expected_value, data[(i + j * width)]); | 803 EXPECT_EQ(expected_value, data[(i + j * width)]); |
804 } | 804 } |
805 } | 805 } |
806 }); | 806 }); |
807 SkCanvasVideoRenderer::TexSubImage2D(GL_TEXTURE_2D, &gles2, video_frame.get(), | 807 SkCanvasVideoRenderer::TexSubImage2D(GL_TEXTURE_2D, &gles2, video_frame.get(), |
808 0, GL_RED, GL_FLOAT, 2 /*xoffset*/, | 808 0, GL_RED, GL_FLOAT, 2 /*xoffset*/, |
809 1 /*yoffset*/, false /*flip_y*/, true); | 809 1 /*yoffset*/, false /*flip_y*/, true); |
810 } | 810 } |
811 | 811 |
812 } // namespace media | 812 } // namespace media |
OLD | NEW |