Chromium Code Reviews| Index: content/browser/renderer_host/compositing_iosurface_mac.mm |
| diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm |
| index 40bb0e42945297a5f30755ec268627b46ec8e311..85aafda411983ed8016123ffc3b9c8b5401e25b0 100644 |
| --- a/content/browser/renderer_host/compositing_iosurface_mac.mm |
| +++ b/content/browser/renderer_host/compositing_iosurface_mac.mm |
| @@ -335,13 +335,6 @@ void CompositingIOSurfaceMac::SwitchToContextOnNewWindow( |
| context_ = new_context; |
| } |
| -void CompositingIOSurfaceMac::SetDeviceScaleFactor(float scale_factor) { |
| - // TODO: After a resolution change, the DPI-ness of the view and the |
| - // IOSurface might not be in sync. |
| - io_surface_size_ = gfx::ToFlooredSize( |
| - gfx::ScaleSize(pixel_io_surface_size_, 1.0 / scale_factor)); |
| -} |
| - |
| bool CompositingIOSurfaceMac::is_vsync_disabled() const { |
| return context_->is_vsync_disabled(); |
| } |
| @@ -366,8 +359,11 @@ CompositingIOSurfaceMac::~CompositingIOSurfaceMac() { |
| } |
| void CompositingIOSurfaceMac::SetIOSurface(uint64 io_surface_handle, |
| - const gfx::Size& size) { |
| + const gfx::Size& size, |
| + float scale_factor) { |
| pixel_io_surface_size_ = size; |
| + io_surface_size_ = gfx::ToFlooredSize( |
| + gfx::ScaleSize(pixel_io_surface_size_, 1.0 / scale_factor)); |
|
Nico
2013/05/22 15:33:22
Does this still have to be a member variable, or c
ccameron
2013/05/22 20:50:12
It's also used when checking HasAcceleratedSurface
|
| CGLSetCurrentContext(context_->cgl_context()); |
| MapIOSurfaceToTexture(io_surface_handle); |
| CGLSetCurrentContext(0); |
| @@ -407,8 +403,6 @@ void CompositingIOSurfaceMac::DrawIOSurface( |
| gfx::ScaleSize(window_size, scale_factor)); |
| glViewport(0, 0, pixel_window_size.width(), pixel_window_size.height()); |
| - SetDeviceScaleFactor(scale_factor); |
| - |
| SurfaceQuad quad; |
| quad.set_size(io_surface_size_, pixel_io_surface_size_); |
| @@ -617,10 +611,6 @@ bool CompositingIOSurfaceMac::MapIOSurfaceToTexture( |
| io_surface_support_->IOSurfaceGetWidth(io_surface_), |
| io_surface_support_->IOSurfaceGetHeight(io_surface_)); |
| - // TODO(thakis): Keep track of the view size over IPC. At the moment, |
| - // the correct view units are computed on first paint. |
| - io_surface_size_ = pixel_io_surface_size_; |
|
Nico
2013/05/22 15:33:22
\o/
|
| - |
| GLenum target = GL_TEXTURE_RECTANGLE_ARB; |
| glGenTextures(1, &texture_); |
| glBindTexture(target, texture_); |