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

Side by Side Diff: trunk/src/views/win/SkOSWindow_win.cpp

Issue 12706010: Add SkTypeface* parameter to SkScalerContext (and its callers) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }; 97 };
98 for (size_t i = 0; i < SK_ARRAY_COUNT(gPair); i++) { 98 for (size_t i = 0; i < SK_ARRAY_COUNT(gPair); i++) {
99 if (gPair[i].fVK == vk) { 99 if (gPair[i].fVK == vk) {
100 return gPair[i].fKey; 100 return gPair[i].fKey;
101 } 101 }
102 } 102 }
103 return kNONE_SkKey; 103 return kNONE_SkKey;
104 } 104 }
105 105
106 static unsigned getModifiers(UINT message) { 106 static unsigned getModifiers(UINT message) {
107 return 0; // TODO 107 » static const struct {
bungeman-skia 2013/03/15 16:12:44 Not sure what this has to do with this change, but
reed1 2013/03/15 17:46:44 Accidentally picked up when I editing on my win ma
108 » » int» fVKey;
109 » » unsigned fSkMask;
110 » } gModi[] = {
111 » » { VK_SHIFT,» » kShift_SkModifierKey },
112 » » { VK_CONTROL,» kControl_SkModifierKey },
113 » » { VK_MENU,» » kOption_SkModifierKey },
114 » };
115
116 » unsigned modi = 0;
117 » for (size_t i = 0; i < SK_ARRAY_COUNT(gModi); ++i) {
118 » » // check the high-bit of the returned ushort
119 » » if (GetKeyState(gModi[i].fVKey) & 0x8000) {
120 » » » modi |= gModi[i].fSkMask;
121 » » }
122 » }
123 » return modi;
108 } 124 }
109 125
110 bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 126 bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
111 switch (message) { 127 switch (message) {
112 case WM_KEYDOWN: { 128 case WM_KEYDOWN: {
113 SkKey key = winToskKey(wParam); 129 SkKey key = winToskKey(wParam);
114 if (kNONE_SkKey != key) { 130 if (kNONE_SkKey != key) {
115 this->handleKey(key); 131 this->handleKey(key);
116 return true; 132 return true;
117 } 133 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 break; 618 break;
603 #endif // SK_ANGLE 619 #endif // SK_ANGLE
604 #endif // SK_SUPPORT_GPU 620 #endif // SK_SUPPORT_GPU
605 default: 621 default:
606 SkASSERT(false); 622 SkASSERT(false);
607 break; 623 break;
608 } 624 }
609 } 625 }
610 626
611 #endif 627 #endif
OLDNEW
« trunk/src/ports/SkFontHost_win_dw.cpp ('K') | « trunk/src/ports/SkFontHost_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698