summaryrefslogtreecommitdiffstats
path: root/app/gfx/blit.cc
diff options
context:
space:
mode:
authorpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 01:37:15 +0000
committerpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 01:37:15 +0000
commitb05be39e20ae9d70bc54c7511d8199517294a2dd (patch)
tree24750b9f4e7ce4061740c08027cea3855572c1af /app/gfx/blit.cc
parent53adb9a6d5c506d8df8a08adc092acd524a79753 (diff)
downloadchromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.zip
chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.gz
chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.bz2
OpenBSD/FreeBSD ifdefs and GYP changes for app/ directory
- Use OS_POSIX && !OS_MACOSX defines to capture Linux/*BSD as they have many similarities, use other defines instead of OS_LINUX where sensible. Based on original work by Sprewell and Ben Laurie on FreeBSD port Review URL: http://codereview.chromium.org/548126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx/blit.cc')
-rw-r--r--app/gfx/blit.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/gfx/blit.cc b/app/gfx/blit.cc
index 359e142..99ac09f 100644
--- a/app/gfx/blit.cc
+++ b/app/gfx/blit.cc
@@ -4,7 +4,7 @@
#include "app/gfx/blit.h"
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include <cairo/cairo.h>
#endif
@@ -45,7 +45,7 @@ void BlitContextToContext(NativeDrawingContext dst_context,
scoped_cftyperef<CGImageRef> src_sub_image(
CGImageCreateWithImageInRect(src_image, src_rect.ToCGRect()));
CGContextDrawImage(dst_context, dst_rect.ToCGRect(), src_sub_image);
-#elif defined(OS_LINUX)
+#else // Linux, BSD, others
// Only translations in the source context are supported; more complex
// source context transforms will be ignored.
cairo_save(dst_context);
@@ -69,7 +69,7 @@ static NativeDrawingContext GetContextFromCanvas(
return device.getBitmapDC();
#elif defined(OS_MACOSX)
return device.GetBitmapContext();
-#elif defined(OS_LINUX)
+#else // Linux, BSD, others
return device.beginPlatformPaint();
#endif
}