Index: skia/ext/platform_device_win.cc |
diff --git a/skia/ext/platform_device_win.cc b/skia/ext/platform_device_win.cc |
index f44e66eb43df48277b3e1343393ed24ca536a264..77996efa4670e909ef3a3d56175b45b2dcf6f168 100644 |
--- a/skia/ext/platform_device_win.cc |
+++ b/skia/ext/platform_device_win.cc |
@@ -10,6 +10,7 @@ |
#include "third_party/skia/include/core/SkRegion.h" |
#include "third_party/skia/include/core/SkUtils.h" |
+#include "/gtools.h" |
namespace skia { |
void InitializeDC(HDC context) { |
@@ -130,12 +131,23 @@ bool PlatformDevice::LoadPathToDC(HDC context, const SkPath& path) { |
// static |
void PlatformDevice::LoadTransformToDC(HDC dc, const SkMatrix& matrix) { |
XFORM xf; |
+ GetWorldTransform(dc,&xf); |
+ if (!((xf.eDx == 0.0) && xf.eDy == 0.0) && (xf.eM11 == 1.0) && (xf.eM22 == 1.0) && |
+ (xf.eM12 == 0.0) && (xf.eM21 == 0.0)) { |
+ ::Debug(L"Tx= {%f, %f, %f\r\n %f, %f, %f}",xf.eM11,xf.eM12,xf.eDx, xf.eM21, xf.eM22, xf.eDy); |
+// OutputDebugString(L"Ack! Non-identity transform!"); |
+ } |
xf.eM11 = matrix[SkMatrix::kMScaleX]; |
xf.eM21 = matrix[SkMatrix::kMSkewX]; |
xf.eDx = matrix[SkMatrix::kMTransX]; |
xf.eM12 = matrix[SkMatrix::kMSkewY]; |
xf.eM22 = matrix[SkMatrix::kMScaleY]; |
xf.eDy = matrix[SkMatrix::kMTransY]; |
+ if (!((xf.eDx == 0.0) && xf.eDy == 0.0) && (xf.eM11 == 1.0) && (xf.eM22 == 1.0) && |
+ (xf.eM12 == 0.0) && (xf.eM21 == 0.0)) { |
+ ::Debug(L"T = {%f, %f, %f\r\n %f, %f, %f}",xf.eM11,xf.eM12,xf.eDx, xf.eM21, xf.eM22, xf.eDy); |
+// OutputDebugString(L"Ack! Non-identity transform!"); |
+ } |
SetWorldTransform(dc, &xf); |
} |