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/OpenGL.h> | 7 #include <OpenGL/OpenGL.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 12 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "gpu/command_buffer/service/gpu_switches.h" | 14 #include "gpu/command_buffer/service/gpu_switches.h" |
15 #include "ui/gfx/gl/gl_context.h" | |
16 #include "ui/gfx/gl/gl_switches.h" | |
17 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 15 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 16 #include "ui/gl/gl_context.h" |
| 17 #include "ui/gl/gl_switches.h" |
18 #include "ui/surface/io_surface_support_mac.h" | 18 #include "ui/surface/io_surface_support_mac.h" |
19 | 19 |
20 #ifdef NDEBUG | 20 #ifdef NDEBUG |
21 #define CHECK_GL_ERROR() | 21 #define CHECK_GL_ERROR() |
22 #else | 22 #else |
23 #define CHECK_GL_ERROR() do { \ | 23 #define CHECK_GL_ERROR() do { \ |
24 GLenum gl_error = glGetError(); \ | 24 GLenum gl_error = glGetError(); \ |
25 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ | 25 LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \ |
26 } while (0) | 26 } while (0) |
27 #endif | 27 #endif |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 } | 443 } |
444 | 444 |
445 void CompositingIOSurfaceMac::GlobalFrameDidChange() { | 445 void CompositingIOSurfaceMac::GlobalFrameDidChange() { |
446 [glContext_ update]; | 446 [glContext_ update]; |
447 } | 447 } |
448 | 448 |
449 void CompositingIOSurfaceMac::ClearDrawable() { | 449 void CompositingIOSurfaceMac::ClearDrawable() { |
450 [glContext_ clearDrawable]; | 450 [glContext_ clearDrawable]; |
451 UnrefIOSurface(); | 451 UnrefIOSurface(); |
452 } | 452 } |
OLD | NEW |