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

Unified Diff: skia/ext/platform_canvas.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/native_drawing_context.h ('k') | skia/ext/platform_canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.h
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index 452a575cc86887b34edebe44662e5e1a791ee240..c71c0dc702a023258cbb22bd6b23dfb18fddd628 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -11,7 +11,7 @@
// The platform-specific device will include the necessary platform headers
// to get the surface type.
#include "build/build_config.h"
-#include "skia/ext/platform_surface.h"
+#include "skia/ext/native_drawing_context.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPixelRef.h"
@@ -130,22 +130,24 @@ SK_API bool GetWritablePixels(SkCanvas* canvas, SkPixmap* pixmap);
// Returns true if native platform routines can be used to draw on the
// given canvas. If this function returns false,
-// ScopedPlatformPaint::GetPlatformSurface() should return NULL.
+// ScopedPlatformPaint::GetNativeDrawingContext() should return NULL.
SK_API bool SupportsPlatformPaint(const SkCanvas* canvas);
// This object guards calls to platform drawing routines. The surface
-// returned from GetPlatformSurface() can be used with the native platform
+// returned from GetNativeDrawingContext() can be used with the native platform
// routines.
class SK_API ScopedPlatformPaint {
public:
explicit ScopedPlatformPaint(SkCanvas* canvas);
- // Returns the PlatformSurface to use for native platform drawing calls.
- PlatformSurface GetPlatformSurface() { return platform_surface_; }
+ // Returns the NativeDrawingContext to use for native platform drawing calls.
+ NativeDrawingContext GetNativeDrawingContext() {
+ return native_drawing_context_;
+ }
private:
SkCanvas* canvas_;
- PlatformSurface platform_surface_;
+ NativeDrawingContext native_drawing_context_;
// Disallow copy and assign
ScopedPlatformPaint(const ScopedPlatformPaint&);
« no previous file with comments | « skia/ext/native_drawing_context.h ('k') | skia/ext/platform_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698