| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromecast/media/base/video_plane_controller.h" | 5 #include "chromecast/media/base/video_plane_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // (i.e. allow at least as much time between calls as the call itself takes). | 133 // (i.e. allow at least as much time between calls as the call itself takes). |
| 134 std::vector<int64_t> samples_; | 134 std::vector<int64_t> samples_; |
| 135 size_t sample_counter_; | 135 size_t sample_counter_; |
| 136 | 136 |
| 137 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 137 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(RateLimitedSetVideoPlaneGeometry); | 139 DISALLOW_COPY_AND_ASSIGN(RateLimitedSetVideoPlaneGeometry); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 VideoPlaneController::VideoPlaneController( | 142 VideoPlaneController::VideoPlaneController( |
| 143 const Size& graphics_resolution, |
| 143 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner) | 144 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner) |
| 144 : is_paused_(false), | 145 : is_paused_(false), |
| 145 have_screen_res_(false), | 146 have_screen_res_(false), |
| 146 have_graphics_plane_res_(false), | 147 have_graphics_plane_res_(true), |
| 147 screen_res_(0, 0), | 148 screen_res_(0, 0), |
| 148 graphics_plane_res_(0, 0), | 149 graphics_plane_res_(graphics_resolution), |
| 149 have_video_plane_geometry_(false), | 150 have_video_plane_geometry_(false), |
| 150 video_plane_display_rect_(0, 0), | 151 video_plane_display_rect_(0, 0), |
| 151 video_plane_transform_(VideoPlane::TRANSFORM_NONE), | 152 video_plane_transform_(VideoPlane::TRANSFORM_NONE), |
| 152 media_task_runner_(media_task_runner), | 153 media_task_runner_(media_task_runner), |
| 153 video_plane_wrapper_( | 154 video_plane_wrapper_( |
| 154 new RateLimitedSetVideoPlaneGeometry(media_task_runner_)) {} | 155 new RateLimitedSetVideoPlaneGeometry(media_task_runner_)) {} |
| 155 | 156 |
| 156 VideoPlaneController::~VideoPlaneController() {} | 157 VideoPlaneController::~VideoPlaneController() {} |
| 157 | 158 |
| 158 void VideoPlaneController::SetGeometry(const RectF& display_rect, | 159 void VideoPlaneController::SetGeometry(const RectF& display_rect, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 273 } |
| 273 | 274 |
| 274 void VideoPlaneController::ClearVideoPlaneGeometry() { | 275 void VideoPlaneController::ClearVideoPlaneGeometry() { |
| 275 have_video_plane_geometry_ = false; | 276 have_video_plane_geometry_ = false; |
| 276 video_plane_display_rect_ = RectF(0, 0); | 277 video_plane_display_rect_ = RectF(0, 0); |
| 277 video_plane_transform_ = VideoPlane::TRANSFORM_NONE; | 278 video_plane_transform_ = VideoPlane::TRANSFORM_NONE; |
| 278 } | 279 } |
| 279 | 280 |
| 280 } // namespace media | 281 } // namespace media |
| 281 } // namespace chromecast | 282 } // namespace chromecast |
| OLD | NEW |