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

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

Issue 8233027: Support dynamic switching between integrated and discrete GPUs on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « content/plugin/webplugin_proxy.h ('k') | content/renderer/gpu/gpu_channel_host.h » ('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 #include "content/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_handle.h" 10 #include "base/memory/scoped_handle.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // This message can be sent during event-handling, and needs to be delivered 666 // This message can be sent during event-handling, and needs to be delivered
667 // within that context. 667 // within that context.
668 msg->set_unblock(true); 668 msg->set_unblock(true);
669 Send(msg); 669 Send(msg);
670 } 670 }
671 671
672 void WebPluginProxy::BindFakePluginWindowHandle(bool opaque) { 672 void WebPluginProxy::BindFakePluginWindowHandle(bool opaque) {
673 Send(new PluginHostMsg_BindFakePluginWindowHandle(route_id_, opaque)); 673 Send(new PluginHostMsg_BindFakePluginWindowHandle(route_id_, opaque));
674 } 674 }
675 675
676 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface() { 676 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface(
677 gfx::GpuPreference gpu_preference) {
677 if (!accelerated_surface_.get()) 678 if (!accelerated_surface_.get())
678 accelerated_surface_.reset(new WebPluginAcceleratedSurfaceProxy(this)); 679 accelerated_surface_.reset(new WebPluginAcceleratedSurfaceProxy(
680 this, gpu_preference));
679 return accelerated_surface_.get(); 681 return accelerated_surface_.get();
680 } 682 }
681 683
682 void WebPluginProxy::AcceleratedFrameBuffersDidSwap( 684 void WebPluginProxy::AcceleratedFrameBuffersDidSwap(
683 gfx::PluginWindowHandle window, uint64 surface_id) { 685 gfx::PluginWindowHandle window, uint64 surface_id) {
684 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped( 686 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped(
685 route_id_, window, surface_id)); 687 route_id_, window, surface_id));
686 } 688 }
687 689
688 void WebPluginProxy::SetAcceleratedSurface( 690 void WebPluginProxy::SetAcceleratedSurface(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // Retrieve the IME status from a plug-in and send it to a renderer process 756 // Retrieve the IME status from a plug-in and send it to a renderer process
755 // when the plug-in has updated it. 757 // when the plug-in has updated it.
756 int input_type; 758 int input_type;
757 gfx::Rect caret_rect; 759 gfx::Rect caret_rect;
758 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 760 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
759 return; 761 return;
760 762
761 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 763 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
762 } 764 }
763 #endif 765 #endif
OLDNEW
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | content/renderer/gpu/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698