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

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

Issue 1405963014: Add ifdef guard around gpu-specific code in native windows window. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: I'm an idiot Created 5 years, 1 month 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 default: 685 default:
686 SkASSERT(false); 686 SkASSERT(false);
687 break; 687 break;
688 } 688 }
689 } 689 }
690 690
691 bool SkOSWindow::makeFullscreen() { 691 bool SkOSWindow::makeFullscreen() {
692 if (fFullscreen) { 692 if (fFullscreen) {
693 return true; 693 return true;
694 } 694 }
695 #if SK_SUPPORT_GPU
695 if (fHGLRC) { 696 if (fHGLRC) {
696 this->detachGL(); 697 this->detachGL();
697 } 698 }
699 #endif // SK_SUPPORT_GPU
698 // This is hacked together from various sources on the web. It can certainly be improved and be 700 // This is hacked together from various sources on the web. It can certainly be improved and be
699 // made more robust. 701 // made more robust.
700 702
701 // Save current window/resolution information. We do this in case we ever im plement switching 703 // Save current window/resolution information. We do this in case we ever im plement switching
702 // back to windowed mode. 704 // back to windowed mode.
703 fSavedWindowState.fZoomed = SkToBool(IsZoomed((HWND)fHWND)); 705 fSavedWindowState.fZoomed = SkToBool(IsZoomed((HWND)fHWND));
704 if (fSavedWindowState.fZoomed) { 706 if (fSavedWindowState.fZoomed) {
705 SendMessage((HWND)fHWND, WM_SYSCOMMAND, SC_RESTORE, 0); 707 SendMessage((HWND)fHWND, WM_SYSCOMMAND, SC_RESTORE, 0);
706 } 708 }
707 fSavedWindowState.fStyle = GetWindowLong((HWND)fHWND, GWL_STYLE); 709 fSavedWindowState.fStyle = GetWindowLong((HWND)fHWND, GWL_STYLE);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 } 770 }
769 771
770 void SkOSWindow::closeWindow() { 772 void SkOSWindow::closeWindow() {
771 DestroyWindow((HWND)fHWND); 773 DestroyWindow((HWND)fHWND);
772 if (fFullscreen) { 774 if (fFullscreen) {
773 DestroyWindow((HWND)fSavedWindowState.fHWND); 775 DestroyWindow((HWND)fSavedWindowState.fHWND);
774 } 776 }
775 gHwndToOSWindowMap.remove(fHWND); 777 gHwndToOSWindowMap.remove(fHWND);
776 } 778 }
777 #endif 779 #endif
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698