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" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 } | 210 } |
211 for (int i = 0; i < num_outputs; ++i) { | 211 for (int i = 0; i < num_outputs; ++i) { |
212 if (!pixel_buffers[i]) { | 212 if (!pixel_buffers[i]) { |
213 glGenBuffersARB(1, &pixel_buffers[i]); CHECK_GL_ERROR(); | 213 glGenBuffersARB(1, &pixel_buffers[i]); CHECK_GL_ERROR(); |
214 } | 214 } |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 | 218 |
219 // static | 219 // static |
220 CompositingIOSurfaceMac* CompositingIOSurfaceMac::Create() { | 220 scoped_refptr<CompositingIOSurfaceMac> CompositingIOSurfaceMac::Create() { |
221 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); | 221 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); |
222 if (!io_surface_support) { | 222 if (!io_surface_support) { |
223 LOG(ERROR) << "No IOSurface support"; | 223 LOG(ERROR) << "No IOSurface support"; |
224 return NULL; | 224 return NULL; |
225 } | 225 } |
226 | 226 |
227 scoped_refptr<CompositingIOSurfaceContext> offscreen_context = | 227 scoped_refptr<CompositingIOSurfaceContext> offscreen_context = |
228 CompositingIOSurfaceContext::Get( | 228 CompositingIOSurfaceContext::Get( |
229 CompositingIOSurfaceContext::kOffscreenContextWindowNumber); | 229 CompositingIOSurfaceContext::kOffscreenContextWindowNumber); |
230 if (!offscreen_context) { | 230 if (!offscreen_context) { |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 } | 988 } |
989 | 989 |
990 // static | 990 // static |
991 base::LazyInstance<CompositingIOSurfaceMac::EvictionQueue> | 991 base::LazyInstance<CompositingIOSurfaceMac::EvictionQueue> |
992 CompositingIOSurfaceMac::eviction_queue_; | 992 CompositingIOSurfaceMac::eviction_queue_; |
993 | 993 |
994 // static | 994 // static |
995 bool CompositingIOSurfaceMac::eviction_scheduled_ = false; | 995 bool CompositingIOSurfaceMac::eviction_scheduled_ = false; |
996 | 996 |
997 } // namespace content | 997 } // namespace content |
OLD | NEW |