OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
9 | 9 |
10 #if defined(SK_BUILD_FOR_WIN) | 10 #if defined(SK_BUILD_FOR_WIN) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return true; | 123 return true; |
124 } | 124 } |
125 } break; | 125 } break; |
126 case WM_UNICHAR: | 126 case WM_UNICHAR: |
127 this->handleChar((SkUnichar) wParam); | 127 this->handleChar((SkUnichar) wParam); |
128 return true; | 128 return true; |
129 case WM_CHAR: { | 129 case WM_CHAR: { |
130 this->handleChar(SkUTF8_ToUnichar((char*)&wParam)); | 130 this->handleChar(SkUTF8_ToUnichar((char*)&wParam)); |
131 return true; | 131 return true; |
132 } break; | 132 } break; |
133 case WM_SIZE: | 133 case WM_SIZE: { |
134 this->resize(lParam & 0xFFFF, lParam >> 16); | 134 INT width = LOWORD(lParam); |
| 135 INT height = HIWORD(lParam); |
| 136 this->resize(width, height); |
135 break; | 137 break; |
| 138 } |
136 case WM_PAINT: { | 139 case WM_PAINT: { |
137 PAINTSTRUCT ps; | 140 PAINTSTRUCT ps; |
138 HDC hdc = BeginPaint(hWnd, &ps); | 141 HDC hdc = BeginPaint(hWnd, &ps); |
139 this->doPaint(hdc); | 142 this->doPaint(hdc); |
140 EndPaint(hWnd, &ps); | 143 EndPaint(hWnd, &ps); |
141 return true; | 144 return true; |
142 } break; | 145 } break; |
143 | 146 |
144 case WM_TIMER: { | 147 case WM_TIMER: { |
145 RECT* rect = (RECT*)wParam; | 148 RECT* rect = (RECT*)wParam; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 break; | 606 break; |
604 #endif // SK_ANGLE | 607 #endif // SK_ANGLE |
605 #endif // SK_SUPPORT_GPU | 608 #endif // SK_SUPPORT_GPU |
606 default: | 609 default: |
607 SkASSERT(false); | 610 SkASSERT(false); |
608 break; | 611 break; |
609 } | 612 } |
610 } | 613 } |
611 | 614 |
612 #endif | 615 #endif |
OLD | NEW |