| 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 #ifndef REMOTING_CAPTURER_SCOPED_PIXEL_BUFFER_OBJECT_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SCOPED_PIXEL_BUFFER_OBJECT_H_ |
| 6 #define REMOTING_CAPTURER_SCOPED_PIXEL_BUFFER_OBJECT_H_ | 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_SCOPED_PIXEL_BUFFER_OBJECT_H_ |
| 7 | 7 |
| 8 #include <OpenGL/CGLMacro.h> | 8 #include <OpenGL/CGLMacro.h> |
| 9 #include <OpenGL/OpenGL.h> | 9 #include <OpenGL/OpenGL.h> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 namespace remoting { | 12 namespace media { |
| 13 | 13 |
| 14 class ScopedPixelBufferObject { | 14 class ScopedPixelBufferObject { |
| 15 public: | 15 public: |
| 16 ScopedPixelBufferObject(); | 16 ScopedPixelBufferObject(); |
| 17 ~ScopedPixelBufferObject(); | 17 ~ScopedPixelBufferObject(); |
| 18 | 18 |
| 19 bool Init(CGLContextObj cgl_context, int size_in_bytes); | 19 bool Init(CGLContextObj cgl_context, int size_in_bytes); |
| 20 void Release(); | 20 void Release(); |
| 21 | 21 |
| 22 GLuint get() const { return pixel_buffer_object_; } | 22 GLuint get() const { return pixel_buffer_object_; } |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 CGLContextObj cgl_context_; | 25 CGLContextObj cgl_context_; |
| 26 GLuint pixel_buffer_object_; | 26 GLuint pixel_buffer_object_; |
| 27 | 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(ScopedPixelBufferObject); | 28 DISALLOW_COPY_AND_ASSIGN(ScopedPixelBufferObject); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } // namespace remoting | 31 } // namespace media |
| 32 | 32 |
| 33 #endif // REMOTING_CAPTURER_SCOPED_PIXEL_BUFFER_OBJECT_H_ | 33 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCOPED_PIXEL_BUFFER_OBJECT_H_ |
| OLD | NEW |