Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: chromecast/media/cma/backend/video_plane.h

Issue 809173002: Chromecast: Add a way to notify video plane about resolution changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify videoplane factory, cr feedback Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/media/cma/backend/video_plane.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/backend/video_plane.h
diff --git a/chromecast/media/cma/backend/video_plane.h b/chromecast/media/cma/backend/video_plane.h
index 6938b8d3283b7ed7ae908f9c296d7f97280552ce..6c98d29c59fd8109514750fc2859b16a166a7858 100644
--- a/chromecast/media/cma/backend/video_plane.h
+++ b/chromecast/media/cma/backend/video_plane.h
@@ -6,6 +6,7 @@
#define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PLANE_H_
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
namespace gfx {
class QuadF;
@@ -28,8 +29,8 @@ class VideoPlane {
VideoPlane();
virtual ~VideoPlane();
- // Gets video plane resolution.
- virtual gfx::Size GetVideoPlaneResolution() = 0;
+ // Gets output screen resolution.
+ virtual gfx::Size GetScreenResolution() = 0;
// Updates the video plane geometry.
// |quad.p1()| corresponds to the top left of the original video,
@@ -41,10 +42,18 @@ class VideoPlane {
virtual void SetGeometry(const gfx::QuadF& quad,
CoordinateType coordinate_type) = 0;
+ // Should be invoked whenever screen resolution changes (e.g. when a device is
+ // plugged into a new HDMI port and a new HDMI EDID is received).
+ // VideoPlane should reposition itself according to the new screen resolution.
+ virtual void OnScreenResolutionChanged(const gfx::Size& screen_res) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(VideoPlane);
};
+// Factory to create a VideoPlane.
+scoped_ptr<VideoPlane> CreateVideoPlane();
lcwu1 2014/12/18 02:51:17 What I mean is to make this a static function insi
+
// Global accessor to the video plane.
VideoPlane* GetVideoPlane();
« no previous file with comments | « no previous file | chromecast/media/cma/backend/video_plane.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698