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

Side by Side Diff: ui/base/cocoa/underlay_opengl_hosting_window.mm

Issue 203573005: Disable CoreAnimation by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" 5 #import "ui/base/cocoa/underlay_opengl_hosting_window.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 15 matching lines...) Expand all
26 // on the right and left edge of the window. 26 // on the right and left edge of the window.
27 - (void)_setContentHasShadow:(BOOL)shadow; 27 - (void)_setContentHasShadow:(BOOL)shadow;
28 @end 28 @end
29 29
30 @interface OpaqueView : NSView 30 @interface OpaqueView : NSView
31 @end 31 @end
32 32
33 namespace { 33 namespace {
34 34
35 bool CoreAnimationIsEnabled() { 35 bool CoreAnimationIsEnabled() {
36 static bool is_enabled = !CommandLine::ForCurrentProcess()->HasSwitch( 36 static bool is_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
37 switches::kDisableCoreAnimation); 37 switches::kEnableCoreAnimation);
38 return is_enabled; 38 return is_enabled;
39 } 39 }
40 40
41 NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) { 41 NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) {
42 BOOL view_1_is_opaque_view = [view1 isKindOfClass:[OpaqueView class]]; 42 BOOL view_1_is_opaque_view = [view1 isKindOfClass:[OpaqueView class]];
43 BOOL view_2_is_opaque_view = [view2 isKindOfClass:[OpaqueView class]]; 43 BOOL view_2_is_opaque_view = [view2 isKindOfClass:[OpaqueView class]];
44 if (view_1_is_opaque_view && view_2_is_opaque_view) 44 if (view_1_is_opaque_view && view_2_is_opaque_view)
45 return NSOrderedSame; 45 return NSOrderedSame;
46 if (view_1_is_opaque_view) 46 if (view_1_is_opaque_view)
47 return NSOrderedDescending; 47 return NSOrderedDescending;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 NSViewHeightSizable]; 156 NSViewHeightSizable];
157 [rightOpaque setAlphaValue:kAlphaValueJustOpaqueEnough]; 157 [rightOpaque setAlphaValue:kAlphaValueJustOpaqueEnough];
158 [rootView addSubview:rightOpaque]; 158 [rootView addSubview:rightOpaque];
159 } 159 }
160 } 160 }
161 161
162 return self; 162 return self;
163 } 163 }
164 164
165 @end 165 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_context_mac.mm ('k') | ui/base/ui_base_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698