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/media/rendering_helper.h" | 5 #include "content/common/gpu/media/rendering_helper.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #import <OpenGL/gl.h> | 8 #import <OpenGL/gl.h> |
9 #import <OpenGL/CGLMacro.h> | 9 #import <OpenGL/CGLMacro.h> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); | 72 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); |
73 glDisable(GL_TEXTURE_RECTANGLE_ARB); | 73 glDisable(GL_TEXTURE_RECTANGLE_ARB); |
74 | 74 |
75 if (!suppress_swap_to_display) | 75 if (!suppress_swap_to_display) |
76 [[gl_view openGLContext] flushBuffer]; | 76 [[gl_view openGLContext] flushBuffer]; |
77 [gl_view unlockFocus]; | 77 [gl_view unlockFocus]; |
78 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); | 78 CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR); |
79 } | 79 } |
80 | 80 |
81 namespace video_test_util { | 81 namespace content { |
82 | 82 |
83 class RenderingHelperMac : public RenderingHelper { | 83 class RenderingHelperMac : public RenderingHelper { |
84 public: | 84 public: |
85 RenderingHelperMac(); | 85 RenderingHelperMac(); |
86 virtual ~RenderingHelperMac(); | 86 virtual ~RenderingHelperMac(); |
87 | 87 |
88 // Implement RenderingHelper. | 88 // Implement RenderingHelper. |
89 virtual void Initialize(bool suppress_swap_to_display, | 89 virtual void Initialize(bool suppress_swap_to_display, |
90 int num_windows, | 90 int num_windows, |
91 int width, | 91 int width, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 void* RenderingHelperMac::GetGLContext() { | 214 void* RenderingHelperMac::GetGLContext() { |
215 return GetCGLContext(gl_view_); | 215 return GetCGLContext(gl_view_); |
216 } | 216 } |
217 | 217 |
218 void* RenderingHelperMac::GetGLDisplay() { | 218 void* RenderingHelperMac::GetGLDisplay() { |
219 return NULL; | 219 return NULL; |
220 } | 220 } |
221 | 221 |
222 } // namespace video_test_util | 222 } // namespace content |
OLD | NEW |