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

Side by Side Diff: remoting/host/capturer_mac.cc

Issue 7565025: Use correct OpenGL test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/host/capturer.h" 5 #include "remoting/host/capturer.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <OpenGL/CGLMacro.h> 8 #include <OpenGL/CGLMacro.h>
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ReleaseBuffers(); 242 ReleaseBuffers();
243 InvalidRects rects; 243 InvalidRects rects;
244 helper_.SwapInvalidRects(rects); 244 helper_.SwapInvalidRects(rects);
245 last_buffer_ = NULL; 245 last_buffer_ = NULL;
246 246
247 CGDirectDisplayID mainDevice = CGMainDisplayID(); 247 CGDirectDisplayID mainDevice = CGMainDisplayID();
248 int width = CGDisplayPixelsWide(mainDevice); 248 int width = CGDisplayPixelsWide(mainDevice);
249 int height = CGDisplayPixelsHigh(mainDevice); 249 int height = CGDisplayPixelsHigh(mainDevice);
250 InvalidateScreen(gfx::Size(width, height)); 250 InvalidateScreen(gfx::Size(width, height));
251 251
252 if (CGDisplayIsBuiltin(mainDevice)) { 252 if (!CGDisplayUsesOpenGLAcceleration(mainDevice)) {
253 VLOG(3) << "OpenGL support not available."; 253 VLOG(3) << "OpenGL support not available.";
254 return; 254 return;
255 } 255 }
256 256
257 CGLPixelFormatAttribute attributes[] = { 257 CGLPixelFormatAttribute attributes[] = {
258 kCGLPFAFullScreen, 258 kCGLPFAFullScreen,
259 kCGLPFADisplayMask, 259 kCGLPFADisplayMask,
260 (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(mainDevice), 260 (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(mainDevice),
261 (CGLPixelFormatAttribute)0 261 (CGLPixelFormatAttribute)0
262 }; 262 };
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 492
493 } // namespace 493 } // namespace
494 494
495 // static 495 // static
496 Capturer* Capturer::Create() { 496 Capturer* Capturer::Create() {
497 return new CapturerMac(); 497 return new CapturerMac();
498 } 498 }
499 499
500 } // namespace remoting 500 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698