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

Unified Diff: skia/ext/platform_device_mac.cc

Issue 125109: Refactor the PlatformContext layer to have only one class. (Closed)
Patch Set: Created 11 years, 6 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/platform_device_mac.h ('k') | skia/ext/platform_device_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_device_mac.cc
diff --git a/skia/ext/platform_device_mac.cc b/skia/ext/platform_device_mac.cc
index b935b257bc07b77e8f27674db80cd4223a5b2ef1..d61c605c629e8eb1d8ba2a14563e7856618cc186 100644
--- a/skia/ext/platform_device_mac.cc
+++ b/skia/ext/platform_device_mac.cc
@@ -35,18 +35,17 @@ bool constrain(int available_size, int* position, int *size) {
} // namespace
-PlatformDeviceMac::PlatformDeviceMac(const SkBitmap& bitmap)
- : SkDevice(bitmap) {
+PlatformDevice::PlatformDevice(const SkBitmap& bitmap) : SkDevice(bitmap) {
}
// Set up the CGContextRef for peaceful coexistence with Skia
-void PlatformDeviceMac::InitializeCGContext(CGContextRef context) {
+void PlatformDevice::InitializeCGContext(CGContextRef context) {
// CG defaults to the same settings as Skia
}
// static
-void PlatformDeviceMac::LoadPathToCGContext(CGContextRef context,
- const SkPath& path) {
+void PlatformDevice::LoadPathToCGContext(CGContextRef context,
+ const SkPath& path) {
// instead of a persistent attribute of the context, CG specifies the fill
// type per call, so we just have to load up the geometry.
CGContextBeginPath(context);
@@ -89,8 +88,8 @@ void PlatformDeviceMac::LoadPathToCGContext(CGContextRef context,
}
// static
-void PlatformDeviceMac::LoadTransformToCGContext(CGContextRef context,
- const SkMatrix& matrix) {
+void PlatformDevice::LoadTransformToCGContext(CGContextRef context,
+ const SkMatrix& matrix) {
// CoreGraphics can concatenate transforms, but not reset the current one.
// So in order to get the required behavior here, we need to first make
// the current transformation matrix identity and only then load the new one.
@@ -120,7 +119,7 @@ void PlatformDeviceMac::LoadTransformToCGContext(CGContextRef context,
}
// static
-void PlatformDeviceMac::LoadClippingRegionToCGContext(
+void PlatformDevice::LoadClippingRegionToCGContext(
CGContextRef context,
const SkRegion& region,
const SkMatrix& transformation) {
« no previous file with comments | « skia/ext/platform_device_mac.h ('k') | skia/ext/platform_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698