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 "remoting/capturer/mac/scoped_pixel_buffer_object.h" | 5 #include "media/video/capture/screen/mac/scoped_pixel_buffer_object.h" |
6 | 6 |
7 namespace remoting { | 7 namespace media { |
8 | 8 |
9 ScopedPixelBufferObject::ScopedPixelBufferObject() | 9 ScopedPixelBufferObject::ScopedPixelBufferObject() |
10 : cgl_context_(NULL), | 10 : cgl_context_(NULL), |
11 pixel_buffer_object_(0) { | 11 pixel_buffer_object_(0) { |
12 } | 12 } |
13 | 13 |
14 ScopedPixelBufferObject::~ScopedPixelBufferObject() { | 14 ScopedPixelBufferObject::~ScopedPixelBufferObject() { |
15 Release(); | 15 Release(); |
16 } | 16 } |
17 | 17 |
(...skipping 19 matching lines...) Expand all Loading... |
37 | 37 |
38 void ScopedPixelBufferObject::Release() { | 38 void ScopedPixelBufferObject::Release() { |
39 if (pixel_buffer_object_) { | 39 if (pixel_buffer_object_) { |
40 CGLContextObj CGL_MACRO_CONTEXT = cgl_context_; | 40 CGLContextObj CGL_MACRO_CONTEXT = cgl_context_; |
41 glDeleteBuffersARB(1, &pixel_buffer_object_); | 41 glDeleteBuffersARB(1, &pixel_buffer_object_); |
42 cgl_context_ = NULL; | 42 cgl_context_ = NULL; |
43 pixel_buffer_object_ = 0; | 43 pixel_buffer_object_ = 0; |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 } // namespace remoting | 47 } // namespace media |
OLD | NEW |