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

Side by Side Diff: src/views/mac/SkNSView.mm

Issue 1206563003: Make SkNSView's window accept mouseMoved events (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | 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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #import "SkNSView.h" 8 #import "SkNSView.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 name:@"NSWindowDidChangeBackingPropert iesNotification" 51 name:@"NSWindowDidChangeBackingPropert iesNotification"
52 object:[self window]]; 52 object:[self window]];
53 if (fWind) { 53 if (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 kN32_SkColorType); 60 kN32_SkColorType);
61 [[self window] setAcceptsMouseMovedEvents:YES];
61 } 62 }
62 } 63 }
63 64
64 -(BOOL) isFlipped { 65 -(BOOL) isFlipped {
65 return YES; 66 return YES;
66 } 67 }
67 68
68 - (BOOL)acceptsFirstResponder { 69 - (BOOL)acceptsFirstResponder {
69 return YES; 70 return YES;
70 } 71 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 421 }
421 422
422 - (void)setVSync:(bool)enable { 423 - (void)setVSync:(bool)enable {
423 if (fGLContext) { 424 if (fGLContext) {
424 GLint interval = enable ? 1 : 0; 425 GLint interval = enable ? 1 : 0;
425 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj]; 426 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj];
426 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval); 427 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval);
427 } 428 }
428 } 429 }
429 @end 430 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698