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/browser/renderer_host/compositing_iosurface_mac.h" | 5 #include "content/browser/renderer_host/compositing_iosurface_mac.h" |
6 | 6 |
7 #include <OpenGL/CGLRenderers.h> | 7 #include <OpenGL/CGLRenderers.h> |
8 #include <OpenGL/OpenGL.h> | 8 #include <OpenGL/OpenGL.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/debug/trace_event.h" | 13 #include "base/debug/trace_event.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/mac/mac_util.h" | 15 #include "base/mac/mac_util.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/threading/platform_thread.h" | 17 #include "base/threading/platform_thread.h" |
18 #include "content/browser/renderer_host/compositing_iosurface_context_mac.h" | 18 #include "content/browser/renderer_host/compositing_iosurface_context_mac.h" |
19 #include "content/browser/renderer_host/compositing_iosurface_shader_programs_ma
c.h" | 19 #include "content/browser/renderer_host/compositing_iosurface_shader_programs_ma
c.h" |
20 #include "content/browser/renderer_host/compositing_iosurface_transformer_mac.h" | 20 #include "content/browser/renderer_host/compositing_iosurface_transformer_mac.h" |
21 #include "content/browser/renderer_host/render_widget_host_impl.h" | 21 #include "content/browser/renderer_host/render_widget_host_impl.h" |
22 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 22 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
23 #include "content/common/content_constants_internal.h" | 23 #include "content/common/content_constants_internal.h" |
24 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 24 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
25 #include "gpu/command_buffer/service/gpu_switches.h" | 25 #include "gpu/command_buffer/service/gpu_switches.h" |
26 #include "media/base/video_util.h" | 26 #include "media/base/video_util.h" |
27 #include "third_party/skia/include/core/SkBitmap.h" | 27 #include "third_party/skia/include/core/SkBitmap.h" |
28 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
29 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 29 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 30 #include "ui/gfx/size_conversions.h" |
| 31 #include "ui/gl/gl_context.h" |
30 #include "ui/gl/io_surface_support_mac.h" | 32 #include "ui/gl/io_surface_support_mac.h" |
31 #include "ui/gl/gl_context.h" | |
32 #include "ui/gfx/size_conversions.h" | |
33 | 33 |
34 #ifdef NDEBUG | 34 #ifdef NDEBUG |
35 #define CHECK_GL_ERROR() | 35 #define CHECK_GL_ERROR() |
36 #define CHECK_AND_SAVE_GL_ERROR() | 36 #define CHECK_AND_SAVE_GL_ERROR() |
37 #else | 37 #else |
38 #define CHECK_GL_ERROR() do { \ | 38 #define CHECK_GL_ERROR() do { \ |
39 GLenum gl_error = glGetError(); \ | 39 GLenum gl_error = glGetError(); \ |
40 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 40 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
41 } while (0) | 41 } while (0) |
42 #define CHECK_AND_SAVE_GL_ERROR() do { \ | 42 #define CHECK_AND_SAVE_GL_ERROR() do { \ |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 } | 1035 } |
1036 | 1036 |
1037 GLenum CompositingIOSurfaceMac::GetAndSaveGLError() { | 1037 GLenum CompositingIOSurfaceMac::GetAndSaveGLError() { |
1038 GLenum gl_error = glGetError(); | 1038 GLenum gl_error = glGetError(); |
1039 if (gl_error_ == GL_NO_ERROR) | 1039 if (gl_error_ == GL_NO_ERROR) |
1040 gl_error_ = gl_error; | 1040 gl_error_ = gl_error; |
1041 return gl_error; | 1041 return gl_error; |
1042 } | 1042 } |
1043 | 1043 |
1044 } // namespace content | 1044 } // namespace content |
OLD | NEW |