From 267f784a18083e0aa58e28766cba595fd543dae9 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Wed, 5 Sep 2012 05:41:49 +0000 Subject: Fix up cc stubs and bindings to work in windows Windows is stricter than other platforms in a few ways: *) All files referenced in a .gyp have to actually exist or the generator complains *) Symbols have to be defined in only one object file *) NO_ERROR is #defined by some win32 headers and collides with GL headers *) WEBKIT_DLL has to be set for targets that define exported symbols This fixes these in the cc stubs. BUG= Review URL: https://chromiumcodereview.appspot.com/10915074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154899 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/cc.gyp | 14 +++++++++----- cc/stubs/GraphicsContext3D.h | 11 +++++------ cc/stubs/TextStream.h | 9 +++++---- 3 files changed, 19 insertions(+), 15 deletions(-) (limited to 'cc') diff --git a/cc/cc.gyp b/cc/cc.gyp index a66c5cc..11dd0cedc 100644 --- a/cc/cc.gyp +++ b/cc/cc.gyp @@ -237,19 +237,23 @@ ], 'sources': [ '<@(cc_source_files)', - 'stubs/Extensions3DChromium.h', 'stubs/Extensions3D.h', + 'stubs/Extensions3DChromium.h', + 'stubs/FloatPoint.h', + 'stubs/FloatPoint3D.h', + 'stubs/FloatQuad.h', + 'stubs/FloatRect.h', + 'stubs/FloatSize.h', 'stubs/GraphicsContext3D.h', 'stubs/GraphicsTypes3D.h', + 'stubs/IntPoint.h', + 'stubs/IntRect.h', + 'stubs/IntSize.h', 'stubs/NotImplemented.h', 'stubs/Region.h', - 'stubs/ScrollbarThemeClient.h', - 'stubs/ScrollTypes.h', - 'stubs/SharedGraphicsContext3D.h', 'stubs/SkiaUtils.h', 'stubs/TextStream.h', 'stubs/TilingData.h', - 'stubs/Timer.h', 'stubs/TraceEvent.h', 'stubs/UnitBezier.h', ], diff --git a/cc/stubs/GraphicsContext3D.h b/cc/stubs/GraphicsContext3D.h index 41404f2..eff588e 100644 --- a/cc/stubs/GraphicsContext3D.h +++ b/cc/stubs/GraphicsContext3D.h @@ -9,17 +9,16 @@ #include "IntSize.h" #include "third_party/khronos/GLES2/gl2.h" +#ifdef NO_ERROR +#undef NO_ERROR +#endif + namespace WebCore { class GraphicsContext3D { public: enum SourceDataFormat { SourceFormatRGBA8, SourceFormatBGRA8 }; - static bool computeFormatAndTypeParameters(unsigned, unsigned, unsigned* componentsPerPixel, unsigned* bytesPerComponent) - { - *componentsPerPixel = 4; - *bytesPerComponent = 1; - return true; - } + static bool computeFormatAndTypeParameters(unsigned, unsigned, unsigned* componentsPerPixel, unsigned* bytesPerComponent); enum { ARRAY_BUFFER = GL_ARRAY_BUFFER, diff --git a/cc/stubs/TextStream.h b/cc/stubs/TextStream.h index a9d02d6..8ed4fbb 100644 --- a/cc/stubs/TextStream.h +++ b/cc/stubs/TextStream.h @@ -9,12 +9,13 @@ namespace WebCore { +// These symbols are all defined inside WebCore. class TextStream { public: - TextStream& operator<<(const String&) { return *this; } - TextStream& operator<<(const char*) { return *this; } - TextStream& operator<<(int) { return *this; } - String release() { return ""; } + TextStream& operator<<(const String&); + TextStream& operator<<(const char*); + TextStream& operator<<(int); + String release(); }; } -- cgit v1.1