| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_HOST_CAPTURER_H_ | 5 #ifndef REMOTING_HOST_CAPTURER_H_ |
| 6 #define REMOTING_HOST_CAPTURER_H_ | 6 #define REMOTING_HOST_CAPTURER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 static void EnableXDamage(bool enable); | 78 static void EnableXDamage(bool enable); |
| 79 #endif // defined(OS_LINUX) | 79 #endif // defined(OS_LINUX) |
| 80 | 80 |
| 81 // Called at the beginning of a capturing session. | 81 // Called at the beginning of a capturing session. |
| 82 virtual void Start( | 82 virtual void Start( |
| 83 const CursorShapeChangedCallback& callback) = 0; | 83 const CursorShapeChangedCallback& callback) = 0; |
| 84 | 84 |
| 85 // Called at the end of a capturing session. | 85 // Called at the end of a capturing session. |
| 86 virtual void Stop() = 0; | 86 virtual void Stop() = 0; |
| 87 | 87 |
| 88 // Called when the screen configuration is changed. | |
| 89 virtual void ScreenConfigurationChanged() = 0; | |
| 90 | |
| 91 // Return the pixel format of the screen. | 88 // Return the pixel format of the screen. |
| 92 virtual media::VideoFrame::Format pixel_format() const = 0; | 89 virtual media::VideoFrame::Format pixel_format() const = 0; |
| 93 | 90 |
| 94 // Clear out the invalid region. | |
| 95 virtual void ClearInvalidRegion() = 0; | |
| 96 | |
| 97 // Invalidate the specified region. | 91 // Invalidate the specified region. |
| 98 virtual void InvalidateRegion(const SkRegion& invalid_region) = 0; | 92 virtual void InvalidateRegion(const SkRegion& invalid_region) = 0; |
| 99 | 93 |
| 100 // Invalidate the entire screen, of a given size. | |
| 101 virtual void InvalidateScreen(const SkISize& size) = 0; | |
| 102 | |
| 103 // Invalidate the entire screen, using the size of the most recently | |
| 104 // captured screen. | |
| 105 virtual void InvalidateFullScreen() = 0; | |
| 106 | |
| 107 // Capture the screen data associated with each of the accumulated | 94 // Capture the screen data associated with each of the accumulated |
| 108 // dirty region. | 95 // dirty region. |
| 109 // When the capture is complete, |callback| is called even if the dirty region | 96 // When the capture is complete, |callback| is called even if the dirty region |
| 110 // is empty. | 97 // is empty. |
| 111 // | 98 // |
| 112 // It is OK to call this method while another thread is reading | 99 // It is OK to call this method while another thread is reading |
| 113 // data of the previous capture. | 100 // data of the previous capture. |
| 114 // There can be at most one concurrent read going on when this | 101 // There can be at most one concurrent read going on when this |
| 115 // method is called. | 102 // method is called. |
| 116 virtual void CaptureInvalidRegion( | 103 virtual void CaptureInvalidRegion( |
| 117 const CaptureCompletedCallback& callback) = 0; | 104 const CaptureCompletedCallback& callback) = 0; |
| 118 | 105 |
| 119 // Get the size of the most recently captured screen. | 106 // Get the size of the most recently captured screen. |
| 120 virtual const SkISize& size_most_recent() const = 0; | 107 virtual const SkISize& size_most_recent() const = 0; |
| 121 }; | 108 }; |
| 122 | 109 |
| 123 } // namespace remoting | 110 } // namespace remoting |
| 124 | 111 |
| 125 #endif // REMOTING_HOST_CAPTURER_H_ | 112 #endif // REMOTING_HOST_CAPTURER_H_ |
| OLD | NEW |