diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 20:04:43 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 20:04:43 +0000 |
commit | 380c6e7c5f883a77be1bbd782a467859b8cec8b3 (patch) | |
tree | 2488bd51eecf8b8faec29287be64fbf1441bd03b | |
parent | 29d7f31a75edd24cdbb7c233aca00efe9a9e928f (diff) | |
download | chromium_src-380c6e7c5f883a77be1bbd782a467859b8cec8b3.zip chromium_src-380c6e7c5f883a77be1bbd782a467859b8cec8b3.tar.gz chromium_src-380c6e7c5f883a77be1bbd782a467859b8cec8b3.tar.bz2 |
Oops, fix Linux build failures in r78239 caused by a bad resolve with r77904 and by using an enum value not defined in the Linux cairo headers.
TEST=built on Linux
BUG=none
Review URL: http://codereview.chromium.org/6673051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78269 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | o3d/core/cross/cairo/renderer_cairo.cc | 8 | ||||
-rw-r--r-- | o3d/core/cross/cairo/texture_cairo.cc | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/o3d/core/cross/cairo/renderer_cairo.cc b/o3d/core/cross/cairo/renderer_cairo.cc index 0945af5..8e01dde 100644 --- a/o3d/core/cross/cairo/renderer_cairo.cc +++ b/o3d/core/cross/cairo/renderer_cairo.cc @@ -506,8 +506,8 @@ bool RendererCairo::GoFullscreen(const DisplayWindow& display, if (XGetWindowAttributes(display_, window_, &window_attributes)) { fullscreen_ = true; SetClientSize(window_attributes.width, window_attributes.height); - DestroyCairoSurface(); - CreateCairoSurface(); + DestroyDisplaySurface(); + CreateDisplaySurface(); } #elif defined(OS_WIN) DEVMODE dev_mode; @@ -544,8 +544,8 @@ bool RendererCairo::CancelFullscreen(const DisplayWindow& display, fullscreen_ = false; SetClientSize(width, height); - DestroyCairoSurface(); - CreateCairoSurface(); + DestroyDisplaySurface(); + CreateDisplaySurface(); #elif defined(OS_WIN) if (hwnd_ == NULL) { // Not initialized. diff --git a/o3d/core/cross/cairo/texture_cairo.cc b/o3d/core/cross/cairo/texture_cairo.cc index 78a7e4c..de198e07 100644 --- a/o3d/core/cross/cairo/texture_cairo.cc +++ b/o3d/core/cross/cairo/texture_cairo.cc @@ -49,6 +49,13 @@ Texture::RGBASwizzleIndices g_gl_abgr32f_swizzle_indices = {0, 1, 2, 3}; namespace o2d { +// This is equivalent to the CAIRO_FORMAT_INVALID enum value, but we can't refer +// to that because it was only recently added to the Cairo headers and thus it +// is not present on the Linux buildbots (where we use the OS version of Cairo +// rather than the one in third_party). +static const cairo_format_t kCairoFormatInvalid = + static_cast<cairo_format_t>(-1); + static cairo_format_t CairoFormatFromO3DFormat( Texture::Format format) { switch (format) { @@ -57,7 +64,7 @@ static cairo_format_t CairoFormatFromO3DFormat( case Texture::XRGB8: return CAIRO_FORMAT_RGB24; default: - return CAIRO_FORMAT_INVALID; + return kCairoFormatInvalid; } // Cairo also supports two other pure-alpha formats, but we don't expose those // capabilities. @@ -91,7 +98,7 @@ TextureCairo* TextureCairo::Create(ServiceLocator* service_locator, cairo_format_t cairo_format = CairoFormatFromO3DFormat(format); cairo_surface_t* image_surface; cairo_status_t status; - if (CAIRO_FORMAT_INVALID == cairo_format) { + if (kCairoFormatInvalid == cairo_format) { DLOG(ERROR) << "Texture format " << format << " not supported by Cairo"; goto fail0; } |