Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

Issue 294023012: Use a separate NSView to draw browser composited content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments, clean-u Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.h ('k') | content/browser/renderer_host/render_widget_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698