Commit a4b20ed4 authored by thakis@chromium.org's avatar thakis@chromium.org

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


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91598

Review URL: http://codereview.chromium.org/7227009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91813 0039d316-1c4b-4281-b951-d872f2087c98
parent 0f92d232
......@@ -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
}
......@@ -456,6 +456,9 @@ void BindSkiaToInProcessGL() {
case gfx::kGLImplementationMockGL:
NOTREACHED();
return;
default:
NOTREACHED();
return;
}
static GrGLInterface host_gl_interface = {
......
......@@ -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()),
......
......@@ -29,7 +29,6 @@ bool GLSurfaceCGL::InitializeOneOff() {
(CGLPixelFormatAttribute) kCGLPFAPBuffer,
(CGLPixelFormatAttribute) 0
};
CGLPixelFormatObj pixel_format;
GLint num_pixel_formats;
if (CGLChoosePixelFormat(attribs,
&g_pixel_format,
......
......@@ -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() {
......
......@@ -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': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment