diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 20:45:57 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 20:45:57 +0000 |
commit | 336629d65673b156acf7217d1d2240e31ed43185 (patch) | |
tree | 9f01d18835036280033c1e896951c583d6a42da2 | |
parent | 2df3988eda7c653886f62e65071835de05cc83a0 (diff) | |
download | chromium_src-336629d65673b156acf7217d1d2240e31ed43185.zip chromium_src-336629d65673b156acf7217d1d2240e31ed43185.tar.gz chromium_src-336629d65673b156acf7217d1d2240e31ed43185.tar.bz2 |
Add chromium_code: 1 to surface.gyp and gl.gyp to pick up -Werror.
It looks like this was dropped accidentally in http://codereview.chromium.org/6718027 (surface.gyp) and http://codereview.chromium.org/6722026 (gl.gyp)
Remove now-redudant code that's implied by chromium_code: 1.
Fix the warnings that have crept in since chromium_code: 1 was removed.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7227009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91598 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/gfx/gl/gl.gyp | 32 | ||||
-rw-r--r-- | ui/gfx/gl/gl_context_glx.cc | 8 | ||||
-rw-r--r-- | ui/gfx/gl/gl_surface_cgl.cc | 1 | ||||
-rw-r--r-- | ui/gfx/gl/gl_surface_glx.cc | 4 | ||||
-rw-r--r-- | ui/gfx/surface/surface.gyp | 28 |
5 files changed, 13 insertions, 60 deletions
diff --git a/ui/gfx/gl/gl.gyp b/ui/gfx/gl/gl.gyp index 5da7cf3..2685fbf 100644 --- a/ui/gfx/gl/gl.gyp +++ b/ui/gfx/gl/gl.gyp @@ -3,34 +3,10 @@ # found in the LICENSE file. { - 'target_defaults': { - 'sources/': [ - ['exclude', '/(cocoa|gtk|win)/'], - ['exclude', '_(cocoa|gtk|linux|mac|posix|win|x)\\.(cc|mm?)$'], - ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], - ], - 'conditions': [ - ['toolkit_uses_gtk == 1', {'sources/': [ - ['include', '/gtk/'], - ['include', '_(gtk|linux|posix|skia|x)\\.cc$'], - ['include', '/(gtk|x11)_[^/]*\\.cc$'], - ]}], - ['OS=="mac"', {'sources/': [ - ['include', '/cocoa/'], - ['include', '_(cocoa|mac|posix)\\.(cc|mm?)$'], - ]}, { # else: OS != "mac" - 'sources/': [ - ['exclude', '\\.mm?$'], - ], - }], - ['OS=="win"', - {'sources/': [ - ['include', '_(win)\\.cc$'], - ['include', '/win/'], - ['include', '/win_[^/]*\\.cc$'], - ]}], - ], + 'variables': { + 'chromium_code': 1, }, + 'targets': [ { 'target_name': 'gl', @@ -181,4 +157,4 @@ ], }, ], -}
\ No newline at end of file +} diff --git a/ui/gfx/gl/gl_context_glx.cc b/ui/gfx/gl/gl_context_glx.cc index 1b1a355..ba8d7ab 100644 --- a/ui/gfx/gl/gl_context_glx.cc +++ b/ui/gfx/gl/gl_context_glx.cc @@ -33,13 +33,13 @@ bool IsCompositingWindowManagerActive(Display* display) { // The X macro "None" has been undefined by gl_bindings.h. const int kNone = 0; static Atom net_wm_cm_s0 = kNone; - if (net_wm_cm_s0 == kNone) { + if (net_wm_cm_s0 == static_cast<Atom>(kNone)) { net_wm_cm_s0 = XInternAtom(display, "_NET_WM_CM_S0", True); } - if (net_wm_cm_s0 == kNone) { + if (net_wm_cm_s0 == static_cast<Atom>(kNone)) { return false; } - return XGetSelectionOwner(display, net_wm_cm_s0) != kNone; + return XGetSelectionOwner(display, net_wm_cm_s0) != static_cast<Atom>(kNone); } } // namespace anonymous @@ -124,8 +124,6 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) { if (IsCurrent(surface)) return true; - GLSurfaceGLX* surface_glx = static_cast<GLSurfaceGLX*>(surface); - if (!glXMakeCurrent( GLSurfaceGLX::GetDisplay(), reinterpret_cast<GLXDrawable>(surface->GetHandle()), diff --git a/ui/gfx/gl/gl_surface_cgl.cc b/ui/gfx/gl/gl_surface_cgl.cc index 7b6b89c..ec14cfc 100644 --- a/ui/gfx/gl/gl_surface_cgl.cc +++ b/ui/gfx/gl/gl_surface_cgl.cc @@ -29,7 +29,6 @@ bool GLSurfaceCGL::InitializeOneOff() { (CGLPixelFormatAttribute) kCGLPFAPBuffer, (CGLPixelFormatAttribute) 0 }; - CGLPixelFormatObj pixel_format; GLint num_pixel_formats; if (CGLChoosePixelFormat(attribs, &g_pixel_format, diff --git a/ui/gfx/gl/gl_surface_glx.cc b/ui/gfx/gl/gl_surface_glx.cc index e3058d9..5a051de 100644 --- a/ui/gfx/gl/gl_surface_glx.cc +++ b/ui/gfx/gl/gl_surface_glx.cc @@ -111,8 +111,8 @@ void* NativeViewGLSurfaceGLX::GetConfig() { PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size) : size_(size), - pbuffer_(0), - config_(NULL) { + config_(NULL), + pbuffer_(0) { } PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { diff --git a/ui/gfx/surface/surface.gyp b/ui/gfx/surface/surface.gyp index 960e148..a4e0122 100644 --- a/ui/gfx/surface/surface.gyp +++ b/ui/gfx/surface/surface.gyp @@ -3,37 +3,17 @@ # found in the LICENSE file. { + 'variables': { + 'chromium_code': 1, + }, + 'target_defaults': { - 'sources/': [ - ['exclude', '/(cocoa|gtk|win)/'], - ['exclude', '_(cocoa|gtk|linux|mac|posix|win|x)\\.(cc|mm?)$'], - ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], - ], 'conditions': [ ['toolkit_uses_gtk == 1', { - 'sources/': [ - ['include', '/gtk/'], - ['include', '_(gtk|linux|posix|skia|x)\\.cc$'], - ['include', '/(gtk|x11)_[^/]*\\.cc$'], - ], 'include_dirs': [ '<(DEPTH)/third_party/angle/include', ], }], - ['OS=="mac"', {'sources/': [ - ['include', '/cocoa/'], - ['include', '_(cocoa|mac|posix)\\.(cc|mm?)$'], - ]}, { # else: OS != "mac" - 'sources/': [ - ['exclude', '\\.mm?$'], - ], - }], - ['OS=="win"', - {'sources/': [ - ['include', '_(win)\\.cc$'], - ['include', '/win/'], - ['include', '/win_[^/]*\\.cc$'], - ]}], ], }, 'targets': [ |