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

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

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/utils/SkTFitsIn.h ('k') | src/views/mac/SkOSWindow_Mac.mm » ('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"
11 #include "SkCGUtils.h" 11 #include "SkCGUtils.h"
12 #include "SkEvent.h" 12 #include "SkEvent.h"
13 SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build); 13 static_assert(SK_SUPPORT_GPU, "not_implemented_for_non_gpu_build");
14 #include <OpenGL/gl.h> 14 #include <OpenGL/gl.h>
15 15
16 //#define FORCE_REDRAW 16 //#define FORCE_REDRAW
17 // Can be dropped when we no longer support 10.6. 17 // Can be dropped when we no longer support 10.6.
18 #define RETINA_API_AVAILABLE (defined(MAC_OS_X_VERSION_10_7) && \ 18 #define RETINA_API_AVAILABLE (defined(MAC_OS_X_VERSION_10_7) && \
19 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_1 0_7) 19 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_1 0_7)
20 @implementation SkNSView 20 @implementation SkNSView
21 @synthesize fWind, fTitle, fOptionsDelegate, fGLContext; 21 @synthesize fWind, fTitle, fOptionsDelegate, fGLContext;
22 22
23 - (id)initWithCoder:(NSCoder*)coder { 23 - (id)initWithCoder:(NSCoder*)coder {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 - (void)setVSync:(bool)enable { 423 - (void)setVSync:(bool)enable {
424 if (fGLContext) { 424 if (fGLContext) {
425 GLint interval = enable ? 1 : 0; 425 GLint interval = enable ? 1 : 0;
426 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj]; 426 CGLContextObj ctx = (CGLContextObj)[fGLContext CGLContextObj];
427 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval); 427 CGLSetParameter(ctx, kCGLCPSwapInterval, &interval);
428 } 428 }
429 } 429 }
430 @end 430 @end
OLDNEW
« no previous file with comments | « src/utils/SkTFitsIn.h ('k') | src/views/mac/SkOSWindow_Mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698