| 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 #ifndef CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ | 5 #ifndef CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ |
| 6 #define CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ | 6 #define CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void SetGeometry(const RectF& display_rect, VideoPlane::Transform transform); | 41 void SetGeometry(const RectF& display_rect, VideoPlane::Transform transform); |
| 42 | 42 |
| 43 // Sets physical screen resolution. This must be called at least once when | 43 // Sets physical screen resolution. This must be called at least once when |
| 44 // the final output resolution (HDMI signal or panel resolution) is known, | 44 // the final output resolution (HDMI signal or panel resolution) is known, |
| 45 // then later when it changes. If there is no change to the screen resolution | 45 // then later when it changes. If there is no change to the screen resolution |
| 46 // from the last call to this method, it is a no-op. | 46 // from the last call to this method, it is a no-op. |
| 47 void SetScreenResolution(const Size& resolution); | 47 void SetScreenResolution(const Size& resolution); |
| 48 | 48 |
| 49 // Sets graphics hardware plane resolution, and clears any cached video plane | 49 // Sets graphics hardware plane resolution, and clears any cached video plane |
| 50 // geometry parameters. This must be called at least once when the hardware | 50 // geometry parameters. This must be called at least once when the hardware |
| 51 // graphics plane resolution (same resolution as gfx::Screen) is known, then | 51 // graphics plane resolution (same resolution as display::Screen) is known, |
| 52 // later when it changes. If there is no change to the graphics plane | 52 // then later when it changes. If there is no change to the graphics plane |
| 53 // resolution from the last call to this method, it is a no-op. | 53 // resolution from the last call to this method, it is a no-op. |
| 54 void SetGraphicsPlaneResolution(const Size& resolution); | 54 void SetGraphicsPlaneResolution(const Size& resolution); |
| 55 | 55 |
| 56 // After Pause is called, no further calls to VideoPlane::SetGeometry will be | 56 // After Pause is called, no further calls to VideoPlane::SetGeometry will be |
| 57 // made except for any pending calls already scheduled on the media thread. | 57 // made except for any pending calls already scheduled on the media thread. |
| 58 // The Set methods will however update cached parameters that will take | 58 // The Set methods will however update cached parameters that will take |
| 59 // effect once the class is resumed. Safe to call multiple times. | 59 // effect once the class is resumed. Safe to call multiple times. |
| 60 // TODO(esum): Handle the case where there are pending calls already on the | 60 // TODO(esum): Handle the case where there are pending calls already on the |
| 61 // media thread. When this returns, the caller needs to know that absolutely | 61 // media thread. When this returns, the caller needs to know that absolutely |
| 62 // no more SetGeometry calls will be made. | 62 // no more SetGeometry calls will be made. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 base::ThreadChecker thread_checker_; | 100 base::ThreadChecker thread_checker_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(VideoPlaneController); | 102 DISALLOW_COPY_AND_ASSIGN(VideoPlaneController); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace media | 105 } // namespace media |
| 106 } // namespace chromecast | 106 } // namespace chromecast |
| 107 | 107 |
| 108 #endif // CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ | 108 #endif // CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ |
| OLD | NEW |