diff options
Diffstat (limited to 'chromium/cc/output/software_output_device.h')
-rw-r--r-- | chromium/cc/output/software_output_device.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chromium/cc/output/software_output_device.h b/chromium/cc/output/software_output_device.h index 4ecf1fedd8e..e8de5b90570 100644 --- a/chromium/cc/output/software_output_device.h +++ b/chromium/cc/output/software_output_device.h @@ -36,13 +36,13 @@ class CC_EXPORT SoftwareOutputDevice { // Discards any pre-existing backing buffers and allocates memory for a // software device of |size|. This must be called before the // |SoftwareOutputDevice| can be used in other ways. - virtual void Resize(gfx::Size size); + virtual void Resize(const gfx::Size& pixel_size, float scale_factor); // Called on BeginDrawingFrame. The compositor will draw into the returned // SkCanvas. The |SoftwareOutputDevice| implementation needs to provide a // valid SkCanvas of at least size |damage_rect|. This class retains ownership // of the SkCanvas. - virtual SkCanvas* BeginPaint(gfx::Rect damage_rect); + virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect); // Called on FinishDrawingFrame. The compositor will no longer mutate the the // SkCanvas instance returned by |BeginPaint| and should discard any reference @@ -50,13 +50,12 @@ class CC_EXPORT SoftwareOutputDevice { virtual void EndPaint(SoftwareFrameData* frame_data); // Copies pixels inside |rect| from the current software framebuffer to - // |output|. Fails if there is no current softwareframebuffer. - virtual void CopyToBitmap(gfx::Rect rect, SkBitmap* output); + // |pixels|. Fails if there is no current softwareframebuffer. + virtual void CopyToPixels(const gfx::Rect& rect, void* pixels); // Blit the pixel content of the SoftwareOutputDevice by |delta| with the // write clipped to |clip_rect|. - virtual void Scroll(gfx::Vector2d delta, - gfx::Rect clip_rect); + virtual void Scroll(const gfx::Vector2d& delta, const gfx::Rect& clip_rect); // Discard the backing buffer in the surface provided by this instance. virtual void DiscardBackbuffer() {} @@ -75,9 +74,9 @@ class CC_EXPORT SoftwareOutputDevice { virtual gfx::VSyncProvider* GetVSyncProvider(); protected: - gfx::Size viewport_size_; + gfx::Size viewport_pixel_size_; + float scale_factor_; gfx::Rect damage_rect_; - skia::RefPtr<SkBaseDevice> device_; skia::RefPtr<SkCanvas> canvas_; scoped_ptr<gfx::VSyncProvider> vsync_provider_; |