diff options
author | 2017-07-31 11:57:21 -0400 | |
---|---|---|
committer | 2017-07-31 18:39:23 +0000 | |
commit | c722f79b6c8919e1a8a0df6d4d7735c5a8a1b5e8 (patch) | |
tree | f85d2595f5545e2f01d89cc1cf2a0d412cb0d5ea /samplecode/SampleBigGradient.cpp | |
parent | d301629d1dad5da36d6f8225f17b92a3f36eaf2a (diff) |
clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit
Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.
BUG=skia:2679
Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'samplecode/SampleBigGradient.cpp')
-rw-r--r-- | samplecode/SampleBigGradient.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samplecode/SampleBigGradient.cpp b/samplecode/SampleBigGradient.cpp index b5b01c76fa..9d850c905a 100644 --- a/samplecode/SampleBigGradient.cpp +++ b/samplecode/SampleBigGradient.cpp @@ -164,7 +164,8 @@ public: HDC hdc = (HDC)fCanvas->accessTopRasterHandle(); COLORREF cr = RGB(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c));// SkEndian_Swap32(c) >> 8; - FillRect(hdc, &toRECT(r.round()), CreateSolidBrush(cr)); + RECT rounded = toRECT(r.round()); + FillRect(hdc, &rounded, CreateSolidBrush(cr)); // Assuming GDI wrote zeros for alpha, this will or-in 0xFF for alpha SkPaint paint; @@ -244,7 +245,8 @@ public: xf.eDy = ctm[SkMatrix::kMTransY]; SetWorldTransform(hdc, &xf); - HRGN hrgn = CreateRectRgnIndirect(&toRECT(clip_bounds)); + RECT clip_bounds_RECT = toRECT(clip_bounds); + HRGN hrgn = CreateRectRgnIndirect(&clip_bounds_RECT); int result = SelectClipRgn(hdc, hrgn); SkASSERT(result != ERROR); result = DeleteObject(hrgn); |