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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 break; | 629 break; |
630 } | 630 } |
631 | 631 |
632 if (result) { | 632 if (result) { |
633 fAttached = attachType; | 633 fAttached = attachType; |
634 } | 634 } |
635 | 635 |
636 return result; | 636 return result; |
637 } | 637 } |
638 | 638 |
639 void SkOSWindow::detach() { | 639 void SkOSWindow::release() { |
640 switch (fAttached) { | 640 switch (fAttached) { |
641 case kNone_BackEndType: | 641 case kNone_BackEndType: |
642 // nothing to do | 642 // nothing to do |
643 break; | 643 break; |
644 #if SK_SUPPORT_GPU | 644 #if SK_SUPPORT_GPU |
645 case kNativeGL_BackEndType: | 645 case kNativeGL_BackEndType: |
646 detachGL(); | 646 detachGL(); |
647 break; | 647 break; |
648 #if SK_ANGLE | 648 #if SK_ANGLE |
649 case kANGLE_BackEndType: | 649 case kANGLE_BackEndType: |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 } | 771 } |
772 | 772 |
773 void SkOSWindow::closeWindow() { | 773 void SkOSWindow::closeWindow() { |
774 DestroyWindow((HWND)fHWND); | 774 DestroyWindow((HWND)fHWND); |
775 if (fFullscreen) { | 775 if (fFullscreen) { |
776 DestroyWindow((HWND)fSavedWindowState.fHWND); | 776 DestroyWindow((HWND)fSavedWindowState.fHWND); |
777 } | 777 } |
778 gHwndToOSWindowMap.remove(fHWND); | 778 gHwndToOSWindowMap.remove(fHWND); |
779 } | 779 } |
780 #endif | 780 #endif |
OLD | NEW |