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 | 8 |
9 #import "SkNSView.h" | 9 #import "SkNSView.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 selector:@selector(backingPropertiesCh
anged:) | 50 selector:@selector(backingPropertiesCh
anged:) |
51 name:@"NSWindowDidChangeBackingPropert
iesNotification" | 51 name:@"NSWindowDidChangeBackingPropert
iesNotification" |
52 object:[self window]]; | 52 object:[self window]]; |
53 if (NULL != fWind) { | 53 if (NULL != fWind) { |
54 fWind->setVisibleP(true); | 54 fWind->setVisibleP(true); |
55 NSSize size = self.frame.size; | 55 NSSize size = self.frame.size; |
56 #if RETINA_API_AVAILABLE | 56 #if RETINA_API_AVAILABLE |
57 size = [self convertSizeToBacking:self.frame.size]; | 57 size = [self convertSizeToBacking:self.frame.size]; |
58 #endif | 58 #endif |
59 fWind->resize((int) size.width, (int) size.height, | 59 fWind->resize((int) size.width, (int) size.height, |
60 kPMColor_SkColorType); | 60 kN32_SkColorType); |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 -(BOOL) isFlipped { | 64 -(BOOL) isFlipped { |
65 return YES; | 65 return YES; |
66 } | 66 } |
67 | 67 |
68 - (BOOL)acceptsFirstResponder { | 68 - (BOOL)acceptsFirstResponder { |
69 return YES; | 69 return YES; |
70 } | 70 } |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 [fGLContext release]; | 411 [fGLContext release]; |
412 fGLContext = nil; | 412 fGLContext = nil; |
413 } | 413 } |
414 | 414 |
415 - (void)present { | 415 - (void)present { |
416 if (nil != fGLContext) { | 416 if (nil != fGLContext) { |
417 [fGLContext flushBuffer]; | 417 [fGLContext flushBuffer]; |
418 } | 418 } |
419 } | 419 } |
420 @end | 420 @end |
OLD | NEW |