From 7b4bff53c5278de18e6e565743aabee1e1a5bcbe Mon Sep 17 00:00:00 2001 From: "ccameron@chromium.org" Date: Wed, 21 May 2014 03:21:07 +0000 Subject: Make delegated software renderer work on Mac Add a device scale factor parameter to SoftwareOutputDevice::Resize and plumb that parameter through to the contentsScale property of the CALayer that is used to draw the software frame. Change the way that RWHVMac draws software frames (both delegated and non-delegated) so that the CALayer for the software frame has setContents called on it with a CGImageRef of the software frame, instead of drawing the CGImageRef to the inside the CALayer's displayInContext function. This is the way that things should have been done to begin with (it involves a lot less copying and a lot more idle time in the browser main thread), but wasn't compatible with the (now-defunct) legacy software path. Change the software rendering path to set the contentsScale of the software CALayer at the time that the software frame is received, when the contents are updated, instead of in RWHVMac::LayoutLayers. BUG=314190 Review URL: https://codereview.chromium.org/297573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271839 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/pixel_test_software_output_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cc/test/pixel_test_software_output_device.h') diff --git a/cc/test/pixel_test_software_output_device.h b/cc/test/pixel_test_software_output_device.h index 7c1dae6..fd8f4b0 100644 --- a/cc/test/pixel_test_software_output_device.h +++ b/cc/test/pixel_test_software_output_device.h @@ -11,7 +11,7 @@ namespace cc { class PixelTestSoftwareOutputDevice : public SoftwareOutputDevice { public: - virtual void Resize(const gfx::Size& size) OVERRIDE; + virtual void Resize(const gfx::Size& pixel_size, float scale_factor) OVERRIDE; void set_surface_expansion_size(const gfx::Size& surface_expansion_size) { surface_expansion_size_ = surface_expansion_size; -- cgit v1.1