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

Side by Side Diff: content/browser/renderer_host/compositing_iosurface_context_mac.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/browser/renderer_host/compositing_iosurface_context_mac.h" 5 #include "content/browser/renderer_host/compositing_iosurface_context_mac.h"
6 6
7 #include <OpenGL/gl.h> 7 #include <OpenGL/gl.h>
8 #include <OpenGL/OpenGL.h> 8 #include <OpenGL/OpenGL.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/trace_event.h" 12 #include "base/debug/trace_event.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "content/browser/renderer_host/compositing_iosurface_shader_programs_ma c.h" 14 #include "content/browser/renderer_host/compositing_iosurface_shader_programs_ma c.h"
15 #include "ui/base/ui_base_switches.h" 15 #include "ui/base/ui_base_switches.h"
16 #include "ui/gl/gl_switches.h" 16 #include "ui/gl/gl_switches.h"
17 #include "ui/gl/gpu_switching_manager.h" 17 #include "ui/gl/gpu_switching_manager.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 CoreAnimationStatus GetCoreAnimationStatus() { 21 CoreAnimationStatus GetCoreAnimationStatus() {
22 static CoreAnimationStatus status = 22 static CoreAnimationStatus status =
23 CommandLine::ForCurrentProcess()->HasSwitch( 23 !CommandLine::ForCurrentProcess()->HasSwitch(
24 switches::kDisableCoreAnimation) ? 24 switches::kEnableCoreAnimation) ?
25 CORE_ANIMATION_DISABLED : CORE_ANIMATION_ENABLED; 25 CORE_ANIMATION_DISABLED : CORE_ANIMATION_ENABLED;
26 return status; 26 return status;
27 } 27 }
28 28
29 // static 29 // static
30 scoped_refptr<CompositingIOSurfaceContext> 30 scoped_refptr<CompositingIOSurfaceContext>
31 CompositingIOSurfaceContext::Get(int window_number) { 31 CompositingIOSurfaceContext::Get(int window_number) {
32 TRACE_EVENT0("browser", "CompositingIOSurfaceContext::Get"); 32 TRACE_EVENT0("browser", "CompositingIOSurfaceContext::Get");
33 33
34 // Return the context for this window_number, if it exists. 34 // Return the context for this window_number, if it exists.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 CompositingIOSurfaceContext::WindowMap* 225 CompositingIOSurfaceContext::WindowMap*
226 CompositingIOSurfaceContext::window_map() { 226 CompositingIOSurfaceContext::window_map() {
227 return window_map_.Pointer(); 227 return window_map_.Pointer();
228 } 228 }
229 229
230 // static 230 // static
231 base::LazyInstance<CompositingIOSurfaceContext::WindowMap> 231 base::LazyInstance<CompositingIOSurfaceContext::WindowMap>
232 CompositingIOSurfaceContext::window_map_; 232 CompositingIOSurfaceContext::window_map_;
233 233
234 } // namespace content 234 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_view.mm ('k') | ui/base/cocoa/underlay_opengl_hosting_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698