summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/compositing_iosurface_mac.h
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-27 05:48:33 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-27 05:48:33 +0000
commiteca216c35b2fdd263c58accef6e68c27f7fc5a22 (patch)
tree8db771269c7d633f44f052c42f74fd553b3af4bb /content/browser/renderer_host/compositing_iosurface_mac.h
parentb1e7562d49aef3d36df8a19ba796c059477b05af (diff)
downloadchromium_src-eca216c35b2fdd263c58accef6e68c27f7fc5a22.zip
chromium_src-eca216c35b2fdd263c58accef6e68c27f7fc5a22.tar.gz
chromium_src-eca216c35b2fdd263c58accef6e68c27f7fc5a22.tar.bz2
Part 3/3 (RWH/IOSurface) of adding with device scale factor to transport surfaces
Pass the scale factor through the image transport surface to the IOSurface creation. Change ViewHostMsg_CompositorSurfaceBuffersSwapped to use a params structure, because there is a limit of 5 IPC arguments. BUG=132714 Review URL: https://chromiumcodereview.appspot.com/15689003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/compositing_iosurface_mac.h')
-rw-r--r--content/browser/renderer_host/compositing_iosurface_mac.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.h b/content/browser/renderer_host/compositing_iosurface_mac.h
index af2436f..2f1e11a 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_mac.h
@@ -59,7 +59,8 @@ class CompositingIOSurfaceMac {
// Set IOSurface that will be drawn on the next NSView drawRect.
void SetIOSurface(uint64 io_surface_handle,
- const gfx::Size& size);
+ const gfx::Size& size,
+ float scale_factor);
// Get the CGL renderer ID currently associated with this context.
int GetRendererID();
@@ -84,7 +85,6 @@ class CompositingIOSurfaceMac {
// |callback| is invoked when the operation is completed or failed.
// Do no call this method again before |callback| is invoked.
void CopyTo(const gfx::Rect& src_pixel_subrect,
- float src_scale_factor,
const gfx::Size& dst_pixel_size,
const base::Callback<void(bool, const SkBitmap&)>& callback);
@@ -92,7 +92,6 @@ class CompositingIOSurfaceMac {
// VideoFrame, and invoke a callback to indicate success or failure.
void CopyToVideoFrame(
const gfx::Rect& src_subrect,
- float src_scale_factor,
const scoped_refptr<media::VideoFrame>& target,
const base::Callback<void(bool)>& callback);
@@ -113,9 +112,7 @@ class CompositingIOSurfaceMac {
return pixel_io_surface_size_;
}
// In cocoa view units / DIPs.
- const gfx::Size& io_surface_size() const { return io_surface_size_; }
-
- void SetDeviceScaleFactor(float scale_factor);
+ const gfx::Size& dip_io_surface_size() const { return dip_io_surface_size_; }
bool is_vsync_disabled() const;
@@ -265,7 +262,6 @@ class CompositingIOSurfaceMac {
// operations. This allow certain optimizations.
base::Closure CopyToVideoFrameWithinContext(
const gfx::Rect& src_subrect,
- float src_scale_factor,
bool called_within_draw,
const scoped_refptr<media::VideoFrame>& target,
const base::Callback<void(bool)>& callback);
@@ -275,7 +271,6 @@ class CompositingIOSurfaceMac {
// |bitmap_output| or letter-boxed YV12 is written to |video_frame_output|.
base::Closure CopyToSelectedOutputWithinContext(
const gfx::Rect& src_pixel_subrect,
- float src_scale_factor,
const gfx::Rect& dst_pixel_rect,
bool called_within_draw,
const SkBitmap* bitmap_output,
@@ -304,8 +299,7 @@ class CompositingIOSurfaceMac {
void FailAllCopies();
void DestroyAllCopyContextsWithinContext();
- gfx::Rect IntersectWithIOSurface(const gfx::Rect& rect,
- float scale_factor) const;
+ gfx::Rect IntersectWithIOSurface(const gfx::Rect& rect) const;
// Cached pointer to IOSurfaceSupport Singleton.
IOSurfaceSupport* io_surface_support_;
@@ -320,7 +314,7 @@ class CompositingIOSurfaceMac {
// The width and height of the io surface.
gfx::Size pixel_io_surface_size_; // In pixels.
- gfx::Size io_surface_size_; // In view units.
+ gfx::Size dip_io_surface_size_; // In view / density independent pixels.
// The "live" OpenGL texture referring to this IOSurfaceRef. Note
// that per the CGLTexImageIOSurface2D API we do not need to