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

Unified Diff: skia/ext/platform_device_win.cc

Issue 12257016: (Not ready for review!) Toolbar and views high dpi support. Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleaned up more useless diffs. Created 7 years, 10 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/bitmap_platform_device_win.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698