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

Unified Diff: skia/ext/platform_surface.h

Issue 1462163002: Move uncoupled code out of skia/ext/platform_device.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-draft-metadata
Patch Set: Trim superfluous SK_API Created 5 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/ext/platform_device_win.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_surface.h
diff --git a/skia/ext/platform_surface.h b/skia/ext/platform_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..b0d5173c40f8929e07c716feb8123ff24dd57726
--- /dev/null
+++ b/skia/ext/platform_surface.h
@@ -0,0 +1,39 @@
+// 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_PLATFORM_SURFACE_H_
+#define SKIA_EXT_PLATFORM_SURFACE_H_
+
+#include "build/build_config.h"
+
+#include "third_party/skia/include/core/SkTypes.h"
+#include "third_party/skia/include/core/SkRect.h"
+
+#if defined(USE_CAIRO)
+typedef struct _cairo cairo_t;
+typedef struct _cairo_rectangle cairo_rectangle_t;
+#elif defined(OS_MACOSX)
+typedef struct CGContext* CGContextRef;
+typedef struct CGRect CGRect;
+#endif
+
+namespace skia {
+
+#if defined(OS_WIN)
+typedef HDC PlatformSurface;
+typedef RECT PlatformRect;
+#elif defined(USE_CAIRO)
+typedef cairo_t* PlatformSurface;
+typedef cairo_rectangle_t PlatformRect;
+#elif defined(OS_MACOSX)
+typedef CGContextRef PlatformSurface;
+typedef CGRect PlatformRect;
+#else
+typedef void* PlatformSurface;
+typedef SkIRect* PlatformRect;
+#endif
+
+} // namespace skia
+
+#endif // SKIA_EXT_PLATFORM_SURFACE_H_
« no previous file with comments | « skia/ext/platform_device_win.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698