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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 8558008: Revert 110626 - Reland 110355 - Use shared D3D9 texture to transport the compositor's backing buf... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
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/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 TransportDIB::Handle transport_dib) { 858 TransportDIB::Handle transport_dib) {
859 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 859 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
860 plugin_container_manager_.SetSizeAndTransportDIB(window, 860 plugin_container_manager_.SetSizeAndTransportDIB(window,
861 width, 861 width,
862 height, 862 height,
863 transport_dib); 863 transport_dib);
864 UpdatePluginGeometry(window, width, height); 864 UpdatePluginGeometry(window, width, height);
865 } 865 }
866 866
867 void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped( 867 void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped(
868 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 868 gfx::PluginWindowHandle window,
869 uint64 surface_id,
870 int renderer_id,
871 int32 route_id,
869 int gpu_host_id) { 872 int gpu_host_id) {
870 TRACE_EVENT0("browser", 873 TRACE_EVENT0("browser",
871 "RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped"); 874 "RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped");
872 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 875 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
873 AcceleratedPluginView* view = ViewForPluginWindowHandle(params.window); 876 AcceleratedPluginView* view = ViewForPluginWindowHandle(window);
874 DCHECK(view); 877 DCHECK(view);
875 if (view) { 878 if (view) {
876 plugin_container_manager_.SetSurfaceWasPaintedTo(params.window, 879 plugin_container_manager_.SetSurfaceWasPaintedTo(window, surface_id);
877 params.surface_id);
878 880
879 // The surface is hidden until its first paint, to not show gargabe. 881 // The surface is hidden until its first paint, to not show gargabe.
880 if (plugin_container_manager_.SurfaceShouldBeVisible(params.window)) 882 if (plugin_container_manager_.SurfaceShouldBeVisible(window))
881 [view setHidden:NO]; 883 [view setHidden:NO];
882 [view drawView]; 884 [view drawView];
883 } 885 }
884 886
885 if (params.renderer_id != 0 || params.route_id != 0) { 887 if (renderer_id != 0 || route_id != 0) {
886 AcknowledgeSwapBuffers(params.renderer_id, 888 AcknowledgeSwapBuffers(renderer_id,
887 params.route_id, 889 route_id,
888 gpu_host_id); 890 gpu_host_id);
889 } 891 }
890 } 892 }
891 893
892 void RenderWidgetHostViewMac::UpdateRootGpuViewVisibility( 894 void RenderWidgetHostViewMac::UpdateRootGpuViewVisibility(
893 bool show_gpu_widget) { 895 bool show_gpu_widget) {
894 // Plugins are destroyed on page navigate. The compositor layer on the other 896 // Plugins are destroyed on page navigate. The compositor layer on the other
895 // hand is created on demand and then stays alive until its renderer process 897 // hand is created on demand and then stays alive until its renderer process
896 // dies (usually on cross-domain navigation). Instead, only a flag 898 // dies (usually on cross-domain navigation). Instead, only a flag
897 // |is_accelerated_compositing_active()| is flipped when the compositor output 899 // |is_accelerated_compositing_active()| is flipped when the compositor output
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
2743 if (!string) return NO; 2745 if (!string) return NO;
2744 2746
2745 // If the user is currently using an IME, confirm the IME input, 2747 // If the user is currently using an IME, confirm the IME input,
2746 // and then insert the text from the service, the same as TextEdit and Safari. 2748 // and then insert the text from the service, the same as TextEdit and Safari.
2747 [self confirmComposition]; 2749 [self confirmComposition];
2748 [self insertText:string]; 2750 [self insertText:string];
2749 return YES; 2751 return YES;
2750 } 2752 }
2751 2753
2752 @end 2754 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698