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