Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: ui/gfx/blit.cc

Issue 59133008: ozone: Support building without cairo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & fix whitespace Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/skia_library.gypi ('k') | ui/gfx/image/image_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/blit.cc
diff --git a/ui/gfx/blit.cc b/ui/gfx/blit.cc
index a0bae8a17ed7f81be37cb8e4f45f0588401ad2d7..4b87bc9aac5c0859ffcf6d7e359a4221e6623ded 100644
--- a/ui/gfx/blit.cc
+++ b/ui/gfx/blit.cc
@@ -11,11 +11,13 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/vector2d.h"
+#if defined(USE_CAIRO)
#if defined(OS_OPENBSD)
#include <cairo.h>
#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
#include <cairo/cairo.h>
#endif
+#endif
#if defined(OS_MACOSX)
#include "base/mac/scoped_cftyperef.h"
@@ -76,9 +78,7 @@ void BlitContextToContext(NativeDrawingContext dst_context,
base::ScopedCFTypeRef<CGImageRef> src_sub_image(
CGImageCreateWithImageInRect(src_image, src_rect.ToCGRect()));
CGContextDrawImage(dst_context, dst_rect.ToCGRect(), src_sub_image);
-#elif defined(OS_ANDROID)
- NOTIMPLEMENTED();
-#else // Linux, BSD, others
+#elif defined(USE_CAIRO)
// Only translations in the source context are supported; more complex
// source context transforms will be ignored.
cairo_save(dst_context);
@@ -92,6 +92,8 @@ void BlitContextToContext(NativeDrawingContext dst_context,
cairo_clip(dst_context);
cairo_paint(dst_context);
cairo_restore(dst_context);
+#else
+ NOTIMPLEMENTED();
#endif
}
« no previous file with comments | « skia/skia_library.gypi ('k') | ui/gfx/image/image_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698