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

Unified Diff: skia/ext/native_drawing_context.h

Issue 2400873002: keep only one typedef for the native drawing context (Closed)
Patch Set: native_drawing_context.h Created 4 years, 2 months 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/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/native_drawing_context.h
diff --git a/skia/ext/native_drawing_context.h b/skia/ext/native_drawing_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..147d7990e1035a843ec6cc6e1cfdb23328cdf81b
--- /dev/null
+++ b/skia/ext/native_drawing_context.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKIA_EXT_NATIVE_DRAWING_CONTEXT_H_
+#define SKIA_EXT_NATIVE_DRAWING_CONTEXT_H_
+
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
+#elif defined(USE_CAIRO)
+typedef struct _cairo cairo_t;
+#elif defined(OS_MACOSX)
+typedef struct CGContext* CGContextRef;
+#endif
+
+namespace skia {
+
+#if defined(OS_WIN)
+typedef HDC NativeDrawingContext;
+#elif defined(USE_CAIRO)
+typedef cairo_t* NativeDrawingContext;
+#elif defined(OS_MACOSX)
+typedef CGContextRef NativeDrawingContext;
+#else
+typedef void* NativeDrawingContext;
+#endif
+
+} // namespace skia
+
+#endif // SKIA_EXT_NATIVE_DRAWING_CONTEXT_H_
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698