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

Unified Diff: skia/ext/platform_canvas.h

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressing comments. Created 9 years, 7 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
Index: skia/ext/platform_canvas.h
===================================================================
--- skia/ext/platform_canvas.h (revision 85672)
+++ skia/ext/platform_canvas.h (working copy)
@@ -63,16 +63,7 @@
// Shared --------------------------------------------------------------------
- // These calls should surround calls to platform drawing routines, the
- // surface returned here can be used with the native platform routines
- //
- // Call endPlatformPaint when you are done and want to use Skia operations
- // after calling the platform-specific beginPlatformPaint; this will
- // synchronize the bitmap to OS if necessary.
- PlatformDevice::PlatformSurface beginPlatformPaint() const;
- void endPlatformPaint() const;
-
- // Returns the platform device pointer of the topmost rect with a non-empty
+ // Returns the SkDevice pointer of the topmost rect with a non-empty
// clip. In practice, this is usually either the top layer or nothing, since
// we usually set the clip to new layers when we make them.
//
@@ -85,7 +76,7 @@
//
// Danger: the resulting device should not be saved. It will be invalidated
// by the next call to save() or restore().
- PlatformDevice& getTopPlatformDevice() const;
+ SkDevice& getTopDevice() const;
// Return the stride (length of a line in bytes) for the given width. Because
// we use 32-bits per pixel, this will be roughly 4*width. However, for
@@ -130,12 +121,13 @@
// Call EndPlatformPaint when you are done and want to use skia operations
// after calling the platform-specific BeginPlatformPaint; this will
// synchronize the bitmap to OS if necessary.
-//
-// Note: These functions will eventually replace
-// PlatformCanvas::beginPlatformPaint and PlatformCanvas::endPlatformPaint.
-SK_API PlatformDevice::PlatformSurface BeginPlatformPaint(SkCanvas* canvas);
+SK_API skia::PlatformSurface BeginPlatformPaint(
alokp 2011/05/19 18:15:15 nit: the whole line can fit in 80 chars.
Jeff Timanus 2011/05/19 20:38:29 Done.
+ SkCanvas* canvas);
SK_API void EndPlatformPaint(SkCanvas* canvas);
+SK_API void DrawToNativeContext(SkCanvas* canvas, PlatformSurface context,
+ int x, int y, const PlatformRect* src_rect);
+
} // namespace skia
#endif // SKIA_EXT_PLATFORM_CANVAS_H_

Powered by Google App Engine
This is Rietveld 408576698