OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "base/macros.h" | 9 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 11 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
11 | 12 |
12 namespace remoting { | 13 namespace remoting { |
13 | 14 |
14 // DesktopFrame implementation used by screen capture on ChromeOS. | 15 // DesktopFrame implementation used by screen capture on ChromeOS. |
15 // Frame data is stored in a SkBitmap. | 16 // Frame data is stored in a SkBitmap. |
16 class SkiaBitmapDesktopFrame : public webrtc::DesktopFrame { | 17 class SkiaBitmapDesktopFrame : public webrtc::DesktopFrame { |
17 public: | 18 public: |
18 static SkiaBitmapDesktopFrame* Create(scoped_ptr<SkBitmap> bitmap); | 19 static SkiaBitmapDesktopFrame* Create(std::unique_ptr<SkBitmap> bitmap); |
19 ~SkiaBitmapDesktopFrame() override; | 20 ~SkiaBitmapDesktopFrame() override; |
20 | 21 |
21 private: | 22 private: |
22 SkiaBitmapDesktopFrame(webrtc::DesktopSize size, | 23 SkiaBitmapDesktopFrame(webrtc::DesktopSize size, |
23 int stride, | 24 int stride, |
24 uint8_t* data, | 25 uint8_t* data, |
25 scoped_ptr<SkBitmap> bitmap); | 26 std::unique_ptr<SkBitmap> bitmap); |
26 | 27 |
27 scoped_ptr<SkBitmap> bitmap_; | 28 std::unique_ptr<SkBitmap> bitmap_; |
28 | 29 |
29 DISALLOW_COPY_AND_ASSIGN(SkiaBitmapDesktopFrame); | 30 DISALLOW_COPY_AND_ASSIGN(SkiaBitmapDesktopFrame); |
30 }; | 31 }; |
31 | 32 |
32 } // namespace remoting | 33 } // namespace remoting |
OLD | NEW |