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

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

Issue 8726046: Partial swaps on OSX (Closed) Base URL: backer@fancypants:chromium/src@master
Patch Set: Now with 10.6 support. Created 9 years 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) 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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 886 }
887 887
888 if (params.route_id != 0) { 888 if (params.route_id != 0) {
889 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id); 889 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id);
890 } 890 }
891 } 891 }
892 892
893 void RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer( 893 void RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer(
894 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 894 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
895 int gpu_host_id) { 895 int gpu_host_id) {
896 NOTIMPLEMENTED(); 896 TRACE_EVENT0("browser",
897 "RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer");
898 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
899 AcceleratedPluginView* view = ViewForPluginWindowHandle(params.window);
900 j DCHECK(view);
apatrick_chromium 2011/12/05 22:42:45 j at beginning of line
jonathan.backer 2011/12/06 18:29:31 <whine> I want focus follows mouse on OSX </whine>
901 if (view) {
902 last_frame_was_accelerated_ = (params.window ==
903 plugin_container_manager_.root_container_handle());
904 plugin_container_manager_.SetSurfaceWasPaintedTo(params.window,
905 params.surface_id,
906 params.x,
907 params.y,
908 params.width,
909 params.height);
910
911 // The surface is hidden until its first paint, to not show gargabe.
apatrick_chromium 2011/12/05 22:42:45 gargabe -> garbage
jonathan.backer 2011/12/06 18:29:31 Done.
912 if (plugin_container_manager_.SurfaceShouldBeVisible(params.window))
913 [view setHidden:NO];
914 [view drawView];
915 }
916
917 if (params.route_id != 0) {
918 RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id);
919 }
897 } 920 }
898 921
899 void RenderWidgetHostViewMac::UpdateRootGpuViewVisibility( 922 void RenderWidgetHostViewMac::UpdateRootGpuViewVisibility(
900 bool show_gpu_widget) { 923 bool show_gpu_widget) {
901 // Plugins are destroyed on page navigate. The compositor layer on the other 924 // Plugins are destroyed on page navigate. The compositor layer on the other
902 // hand is created on demand and then stays alive until its renderer process 925 // hand is created on demand and then stays alive until its renderer process
903 // dies (usually on cross-domain navigation). Instead, only a flag 926 // dies (usually on cross-domain navigation). Instead, only a flag
904 // |is_accelerated_compositing_active()| is flipped when the compositor output 927 // |is_accelerated_compositing_active()| is flipped when the compositor output
905 // should be shown/hidden. 928 // should be shown/hidden.
906 // Show/hide the view belonging to the compositor here. 929 // Show/hide the view belonging to the compositor here.
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 if (!string) return NO; 2731 if (!string) return NO;
2709 2732
2710 // If the user is currently using an IME, confirm the IME input, 2733 // If the user is currently using an IME, confirm the IME input,
2711 // and then insert the text from the service, the same as TextEdit and Safari. 2734 // and then insert the text from the service, the same as TextEdit and Safari.
2712 [self confirmComposition]; 2735 [self confirmComposition];
2713 [self insertText:string]; 2736 [self insertText:string];
2714 return YES; 2737 return YES;
2715 } 2738 }
2716 2739
2717 @end 2740 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698