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 "content/common/gpu/client/gl_helper.h" | 5 #include "content/common/gpu/client/gl_helper.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "content/common/gpu/client/gl_helper_readback_support.h" | 18 #include "content/common/gpu/client/gl_helper_readback_support.h" |
19 #include "content/common/gpu/client/gl_helper_scaling.h" | 19 #include "content/common/gpu/client/gl_helper_scaling.h" |
20 #include "gpu/GLES2/gl2extchromium.h" | 20 #include "gpu/GLES2/gl2extchromium.h" |
21 #include "gpu/command_buffer/client/context_support.h" | 21 #include "gpu/command_buffer/client/context_support.h" |
22 #include "gpu/command_buffer/common/mailbox.h" | 22 #include "gpu/command_buffer/common/mailbox.h" |
23 #include "gpu/command_buffer/common/mailbox_holder.h" | 23 #include "gpu/command_buffer/common/mailbox_holder.h" |
24 #include "media/base/video_frame.h" | 24 #include "media/base/video_frame.h" |
25 #include "media/base/video_util.h" | 25 #include "media/base/video_util.h" |
26 #include "third_party/skia/include/core/SkRegion.h" | 26 #include "third_party/skia/include/core/SkRegion.h" |
27 #include "ui/gfx/geometry/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
28 #include "ui/gfx/size.h" | 28 #include "ui/gfx/geometry/size.h" |
29 | 29 |
30 using gpu::gles2::GLES2Interface; | 30 using gpu::gles2::GLES2Interface; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 class ScopedFlush { | 34 class ScopedFlush { |
35 public: | 35 public: |
36 explicit ScopedFlush(gpu::gles2::GLES2Interface* gl) : gl_(gl) {} | 36 explicit ScopedFlush(gpu::gles2::GLES2Interface* gl) : gl_(gl) {} |
37 | 37 |
38 ~ScopedFlush() { gl_->Flush(); } | 38 ~ScopedFlush() { gl_->Flush(); } |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, | 1352 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, |
1353 src_size, | 1353 src_size, |
1354 src_subrect, | 1354 src_subrect, |
1355 dst_size, | 1355 dst_size, |
1356 dst_subrect, | 1356 dst_subrect, |
1357 flip_vertically, | 1357 flip_vertically, |
1358 use_mrt); | 1358 use_mrt); |
1359 } | 1359 } |
1360 | 1360 |
1361 } // namespace content | 1361 } // namespace content |
OLD | NEW |