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

Side by Side Diff: ui/gfx/gl/gl_surface_cgl.cc

Issue 7227009: Add chromium_code: 1 to surface.gyp and gl.gyp to pick up -Werror. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 9 years, 5 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 | « ui/gfx/gl/gl_context_glx.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | 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 "ui/gfx/gl/gl_surface_cgl.h" 5 #include "ui/gfx/gl/gl_surface_cgl.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/gfx/gl/gl_bindings.h" 9 #include "ui/gfx/gl/gl_bindings.h"
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 bool GLSurfaceCGL::InitializeOneOff() { 23 bool GLSurfaceCGL::InitializeOneOff() {
24 static bool initialized = false; 24 static bool initialized = false;
25 if (initialized) 25 if (initialized)
26 return true; 26 return true;
27 27
28 static const CGLPixelFormatAttribute attribs[] = { 28 static const CGLPixelFormatAttribute attribs[] = {
29 (CGLPixelFormatAttribute) kCGLPFAPBuffer, 29 (CGLPixelFormatAttribute) kCGLPFAPBuffer,
30 (CGLPixelFormatAttribute) 0 30 (CGLPixelFormatAttribute) 0
31 }; 31 };
32 CGLPixelFormatObj pixel_format;
33 GLint num_pixel_formats; 32 GLint num_pixel_formats;
34 if (CGLChoosePixelFormat(attribs, 33 if (CGLChoosePixelFormat(attribs,
35 &g_pixel_format, 34 &g_pixel_format,
36 &num_pixel_formats) != kCGLNoError) { 35 &num_pixel_formats) != kCGLNoError) {
37 LOG(ERROR) << "Error choosing pixel format."; 36 LOG(ERROR) << "Error choosing pixel format.";
38 return false; 37 return false;
39 } 38 }
40 if (num_pixel_formats == 0) { 39 if (num_pixel_formats == 0) {
41 LOG(ERROR) << "num_pixel_formats == 0."; 40 LOG(ERROR) << "num_pixel_formats == 0.";
42 return false; 41 return false;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 96
98 gfx::Size PbufferGLSurfaceCGL::GetSize() { 97 gfx::Size PbufferGLSurfaceCGL::GetSize() {
99 return size_; 98 return size_;
100 } 99 }
101 100
102 void* PbufferGLSurfaceCGL::GetHandle() { 101 void* PbufferGLSurfaceCGL::GetHandle() {
103 return pbuffer_; 102 return pbuffer_;
104 } 103 }
105 104
106 } // namespace gfx 105 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_glx.cc ('k') | ui/gfx/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698