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

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

Issue 1595503002: SampleApp: Remove SkWindow::setColorType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mac build fix Created 4 years, 11 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 | « src/views/SkWindow.cpp ('k') | tools/VisualBench/VisualBench.cpp » ('j') | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 [[NSNotificationCenter defaultCenter] addObserver:self 49 [[NSNotificationCenter defaultCenter] addObserver:self
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 (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);
61 [[self window] setAcceptsMouseMovedEvents:YES]; 60 [[self window] setAcceptsMouseMovedEvents:YES];
62 } 61 }
63 } 62 }
64 63
65 -(BOOL) isFlipped { 64 -(BOOL) isFlipped {
66 return YES; 65 return YES;
67 } 66 }
68 67
69 - (BOOL)acceptsFirstResponder { 68 - (BOOL)acceptsFirstResponder {
70 return YES; 69 return YES;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 420 }
422 421
423 - (void)setVSync:(bool)enable { 422 - (void)setVSync:(bool)enable {
424 if (fGLContext) { 423 if (fGLContext) {
425 GLint interval = enable ? 1 : 0; 424 GLint interval = enable ? 1 : 0;
426 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj]; 425 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj];
427 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval); 426 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval);
428 } 427 }
429 } 428 }
430 @end 429 @end
OLDNEW
« no previous file with comments | « src/views/SkWindow.cpp ('k') | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698