| Index: chromecast/media/base/video_plane_controller.cc
|
| diff --git a/chromecast/media/base/video_plane_controller.cc b/chromecast/media/base/video_plane_controller.cc
|
| index 8f07839f883024cd26af0825818b23fa16e11475..d3846efa105c19fbdf1c015e209fecd7dfda3d35 100644
|
| --- a/chromecast/media/base/video_plane_controller.cc
|
| +++ b/chromecast/media/base/video_plane_controller.cc
|
| @@ -202,8 +202,25 @@ void VideoPlaneController::SetGraphicsPlaneResolution(const Size& resolution) {
|
| MaybeRunSetGeometry();
|
| }
|
|
|
| +void VideoPlaneController::Pause() {
|
| + VLOG(1) << "Pausing controller. No more VideoPlane SetGeometry calls.";
|
| + is_paused_ = true;
|
| +}
|
| +
|
| +void VideoPlaneController::Resume() {
|
| + VLOG(1) << "Resuming controller. VideoPlane SetGeometry calls are active.";
|
| + is_paused_ = false;
|
| +}
|
| +
|
| +void VideoPlaneController::ClearGeometryState() {
|
| + have_video_plane_geometry_ = false;
|
| + video_plane_display_rect_ = RectF(0, 0, 0, 0);
|
| + video_plane_transform_ = VideoPlane::TRANSFORM_NONE;
|
| +}
|
| +
|
| VideoPlaneController::VideoPlaneController()
|
| - : have_output_res_(false),
|
| + : is_paused_(false),
|
| + have_output_res_(false),
|
| have_graphics_res_(false),
|
| output_res_(0, 0),
|
| graphics_res_(0, 0),
|
| @@ -218,8 +235,15 @@ VideoPlaneController::~VideoPlaneController() {}
|
|
|
| void VideoPlaneController::MaybeRunSetGeometry() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| - if (!HaveDataForSetGeometry())
|
| + if (is_paused_) {
|
| + VLOG(2) << "All VideoPlane SetGeometry calls are paused. Ignoring request.";
|
| return;
|
| + }
|
| +
|
| + if (!HaveDataForSetGeometry()) {
|
| + VLOG(2) << "Don't have all VideoPlane SetGeometry data. Ignoring request.";
|
| + return;
|
| + }
|
|
|
| DCHECK(graphics_res_.width != 0 && graphics_res_.height != 0);
|
|
|
|
|