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

Unified Diff: webkit/port/platform/graphics/skia/public/PlatformDeviceMac.cpp

Issue 11244: Move PlatformCanvas and PlatformDevice from base/gfx to webkit/port. I left h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
Index: webkit/port/platform/graphics/skia/public/PlatformDeviceMac.cpp
===================================================================
--- webkit/port/platform/graphics/skia/public/PlatformDeviceMac.cpp (revision 0)
+++ webkit/port/platform/graphics/skia/public/PlatformDeviceMac.cpp (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/gfx/platform_device_mac.h"
+#include "PlatformDeviceMac.h"
#include "base/logging.h"
#include "base/gfx/skia_utils_mac.h"
@@ -100,15 +100,15 @@
// 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.
-
+
// Reset matrix to identity.
CGAffineTransform orig_cg_matrix = CGContextGetCTM(context);
CGAffineTransform orig_cg_matrix_inv = CGAffineTransformInvert(orig_cg_matrix);
CGContextConcatCTM(context, orig_cg_matrix_inv);
-
+
// assert that we have indeed returned to the identity Matrix.
DCHECK(CGAffineTransformIsIdentity(CGContextGetCTM(context)));
-
+
// Convert xform to CG-land.
// Our coordinate system is flipped to match WebKit's so we need to modify
// the xform to match that.
@@ -118,9 +118,9 @@
size_t height = CGBitmapContextGetHeight(context);
SkScalar ty = -matrix.getTranslateY(); // y axis is flipped.
transformed_matrix.setTranslateY(ty + (SkScalar)height);
-
+
CGAffineTransform cg_matrix = SkMatrixToCGAffineTransform(transformed_matrix);
-
+
// Load final transform into context.
CGContextConcatCTM(context, cg_matrix);
}
@@ -156,6 +156,6 @@
// hrgn = PathToRegion(context);
}
}
-
+
} // namespace gfx
Property changes on: webkit\port\platform\graphics\skia\public\PlatformDeviceMac.cpp
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/gfx/platform_device_mac.cc:r69-2775

Powered by Google App Engine
This is Rietveld 408576698