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

Side by Side Diff: content/plugin/webplugin_accelerated_surface_proxy_mac.cc

Issue 9696026: Re-enabling support for compositing core animation plugins as disabling them currently leaves Flash… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025_52/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/plugins/npapi/plugin_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <OpenGL/OpenGL.h> 5 #import <OpenGL/OpenGL.h>
6 6
7 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" 7 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "content/plugin/webplugin_proxy.h" 11 #include "content/plugin/webplugin_proxy.h"
12 #include "ui/base/ui_base_switches.h" 12 #include "ui/base/ui_base_switches.h"
13 #include "ui/gfx/surface/accelerated_surface_mac.h" 13 #include "ui/gfx/surface/accelerated_surface_mac.h"
14 #include "ui/gfx/surface/io_surface_support_mac.h" 14 #include "ui/gfx/surface/io_surface_support_mac.h"
15 #include "ui/gfx/surface/transport_dib.h" 15 #include "ui/gfx/surface/transport_dib.h"
16 16
17 WebPluginAcceleratedSurfaceProxy* WebPluginAcceleratedSurfaceProxy::Create( 17 WebPluginAcceleratedSurfaceProxy* WebPluginAcceleratedSurfaceProxy::Create(
18 WebPluginProxy* plugin_proxy, 18 WebPluginProxy* plugin_proxy,
19 gfx::GpuPreference gpu_preference) { 19 gfx::GpuPreference gpu_preference) {
20 // Temporarily turning off accelerated plugin compositing 20 bool composited = !CommandLine::ForCurrentProcess()->HasSwitch(
21 bool composited = false && !CommandLine::ForCurrentProcess()->HasSwitch(
22 switches::kDisableCompositedCoreAnimationPlugins); 21 switches::kDisableCompositedCoreAnimationPlugins);
23 22
24 // Require IOSurface support for drawing Core Animation plugins. 23 // Require IOSurface support for drawing Core Animation plugins.
25 if (composited && !IOSurfaceSupport::Initialize()) 24 if (composited && !IOSurfaceSupport::Initialize())
26 return NULL; 25 return NULL;
27 26
28 AcceleratedSurface* surface = new AcceleratedSurface; 27 AcceleratedSurface* surface = new AcceleratedSurface;
29 // It's possible for OpenGL to fail to initialize (e.g., if an incompatible 28 // It's possible for OpenGL to fail to initialize (e.g., if an incompatible
30 // mode is forced via flags), so handle that gracefully. 29 // mode is forced via flags), so handle that gracefully.
31 if (!surface->Initialize(NULL, true, gpu_preference)) { 30 if (!surface->Initialize(NULL, true, gpu_preference)) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return; 112 return;
114 113
115 surface_->SwapBuffers(); 114 surface_->SwapBuffers();
116 if (composited_) { 115 if (composited_) {
117 plugin_proxy_->AcceleratedPluginSwappedIOSurface(); 116 plugin_proxy_->AcceleratedPluginSwappedIOSurface();
118 } else { 117 } else {
119 plugin_proxy_->AcceleratedFrameBuffersDidSwap( 118 plugin_proxy_->AcceleratedFrameBuffersDidSwap(
120 window_handle_, surface_->GetSurfaceId()); 119 window_handle_, surface_->GetSurfaceId());
121 } 120 }
122 } 121 }
OLDNEW
« no previous file with comments | « no previous file | webkit/plugins/npapi/plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698