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/render_widget_host_view_mac.mm

Issue 10533098: mac: Improve framerate on accelerated pages in HiDPI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 years, 6 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/browser/renderer_host/compositing_iosurface_mac.mm ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 } 1081 }
1082 } 1082 }
1083 1083
1084 void RenderWidgetHostViewMac::AcceleratedSurfaceSuspend() { 1084 void RenderWidgetHostViewMac::AcceleratedSurfaceSuspend() {
1085 if (compositing_iosurface_.get()) 1085 if (compositing_iosurface_.get())
1086 compositing_iosurface_->UnrefIOSurface(); 1086 compositing_iosurface_->UnrefIOSurface();
1087 } 1087 }
1088 1088
1089 bool RenderWidgetHostViewMac::HasAcceleratedSurface( 1089 bool RenderWidgetHostViewMac::HasAcceleratedSurface(
1090 const gfx::Size& desired_size) { 1090 const gfx::Size& desired_size) {
1091 // TODO: What coordinates is desired_size in? Should it be
1092 // compared to the pixel or logical size of compositing_iosurface_?
1093 return last_frame_was_accelerated_ && 1091 return last_frame_was_accelerated_ &&
1094 compositing_iosurface_.get() && 1092 compositing_iosurface_.get() &&
1095 compositing_iosurface_->HasIOSurface() && 1093 compositing_iosurface_->HasIOSurface() &&
1096 (desired_size.IsEmpty() || 1094 (desired_size.IsEmpty() ||
1097 compositing_iosurface_->pixel_io_surface_size() == desired_size); 1095 compositing_iosurface_->io_surface_size() == desired_size);
1098 } 1096 }
1099 1097
1100 void RenderWidgetHostViewMac::AboutToWaitForBackingStoreMsg() { 1098 void RenderWidgetHostViewMac::AboutToWaitForBackingStoreMsg() {
1101 AckPendingSwapBuffers(); 1099 AckPendingSwapBuffers();
1102 } 1100 }
1103 1101
1104 void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() { 1102 void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() {
1105 } 1103 }
1106 1104
1107 void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) { 1105 void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) {
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 if (!string) return NO; 2991 if (!string) return NO;
2994 2992
2995 // If the user is currently using an IME, confirm the IME input, 2993 // If the user is currently using an IME, confirm the IME input,
2996 // and then insert the text from the service, the same as TextEdit and Safari. 2994 // and then insert the text from the service, the same as TextEdit and Safari.
2997 [self confirmComposition]; 2995 [self confirmComposition];
2998 [self insertText:string]; 2996 [self insertText:string];
2999 return YES; 2997 return YES;
3000 } 2998 }
3001 2999
3002 @end 3000 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698