Chromium Code Reviews| 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 "media/renderers/skcanvas_video_renderer.h" | 5 #include "media/renderers/skcanvas_video_renderer.h" |
| 6 | 6 |
| 7 #include <GLES3/gl3.h> | 7 #include <GLES3/gl3.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "cc/paint/paint_canvas.h" | 12 #include "cc/paint/paint_canvas.h" |
| 13 #include "cc/paint/paint_flags.h" | 13 #include "cc/paint/paint_flags.h" |
| 14 #include "gpu/GLES2/gl2extchromium.h" | 14 #include "gpu/GLES2/gl2extchromium.h" |
| 15 #include "gpu/command_buffer/client/gles2_interface.h" | 15 #include "gpu/command_buffer/client/gles2_interface.h" |
| 16 #include "gpu/command_buffer/common/mailbox_holder.h" | 16 #include "gpu/command_buffer/common/mailbox_holder.h" |
| 17 #include "media/base/data_buffer.h" | 17 #include "media/base/data_buffer.h" |
| 18 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" |
| 19 #include "skia/ext/texture_handle.h" | 19 #include "skia/ext/texture_handle.h" |
| 20 #include "third_party/libyuv/include/libyuv.h" | 20 #include "third_party/libyuv/include/libyuv.h" |
| 21 #include "third_party/skia/include/core/SkImage.h" | 21 #include "third_party/skia/include/core/SkImage.h" |
| 22 #include "third_party/skia/include/core/SkImageGenerator.h" | 22 #include "third_party/skia/include/core/SkImageGenerator.h" |
| 23 #include "third_party/skia/include/gpu/GrContext.h" | 23 #include "third_party/skia/include/gpu/GrContext.h" |
| 24 #include "third_party/skia/include/gpu/GrPaint.h" | 24 #include "third_party/skia/include/gpu/GrPaint.h" |
| 25 #include "third_party/skia/include/gpu/GrTexture.h" | 25 #include "third_party/skia/include/gpu/GrTexture.h" |
|
bsalomon
2017/02/28 18:33:55
Can we remove this, too?
| |
| 26 #include "third_party/skia/include/gpu/GrTextureProvider.h" | |
| 27 #include "third_party/skia/include/gpu/SkGr.h" | 26 #include "third_party/skia/include/gpu/SkGr.h" |
| 28 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" | 27 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" |
| 29 #include "ui/gfx/geometry/rect_f.h" | 28 #include "ui/gfx/geometry/rect_f.h" |
| 30 #include "ui/gfx/skia_util.h" | 29 #include "ui/gfx/skia_util.h" |
| 31 | 30 |
| 32 // Skia internal format depends on a platform. On Android it is ABGR, on others | 31 // Skia internal format depends on a platform. On Android it is ABGR, on others |
| 33 // it is ARGB. | 32 // it is ARGB. |
| 34 #if SK_B32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_R32_SHIFT == 16 && \ | 33 #if SK_B32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_R32_SHIFT == 16 && \ |
| 35 SK_A32_SHIFT == 24 | 34 SK_A32_SHIFT == 24 |
| 36 #define LIBYUV_I420_TO_ARGB libyuv::I420ToARGB | 35 #define LIBYUV_I420_TO_ARGB libyuv::I420ToARGB |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 961 last_image_->bounds().contains(visible_rect)) { | 960 last_image_->bounds().contains(visible_rect)) { |
| 962 last_image_ = last_image_->makeSubset(visible_rect); | 961 last_image_ = last_image_->makeSubset(visible_rect); |
| 963 } | 962 } |
| 964 } | 963 } |
| 965 | 964 |
| 966 SkISize SkCanvasVideoRenderer::LastImageDimensionsForTesting() { | 965 SkISize SkCanvasVideoRenderer::LastImageDimensionsForTesting() { |
| 967 return last_image_dimensions_for_testing_; | 966 return last_image_dimensions_for_testing_; |
| 968 } | 967 } |
| 969 | 968 |
| 970 } // namespace media | 969 } // namespace media |
| OLD | NEW |