OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_ |
| 6 #define CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/cc_export.h" |
| 10 #include "cc/software_output_device.h" |
| 11 #include "skia/ext/refptr.h" |
| 12 |
| 13 class SkCanvas; |
| 14 class SkDevice; |
| 15 |
| 16 namespace cc { |
| 17 |
| 18 class CC_EXPORT SoftwareOutputDeviceImpl : public SoftwareOutputDevice { |
| 19 public: |
| 20 |
| 21 SoftwareOutputDeviceImpl(); |
| 22 virtual ~SoftwareOutputDeviceImpl(); |
| 23 |
| 24 // SoftwareOutputDevice implementation |
| 25 virtual void Resize(const gfx::Size& size) OVERRIDE; |
| 26 |
| 27 virtual SkCanvas* BeginPaint() OVERRIDE; |
| 28 virtual void EndPaint(const gfx::Rect& damage_rect) OVERRIDE; |
| 29 |
| 30 virtual void CopyToBitmap(const gfx::Rect& rect, SkBitmap* output) OVERRIDE; |
| 31 virtual void Scroll(const gfx::Vector2d& delta, |
| 32 const gfx::Rect& clip_rect) OVERRIDE; |
| 33 |
| 34 protected: |
| 35 gfx::Size viewport_size_; |
| 36 skia::RefPtr<SkDevice> device_; |
| 37 skia::RefPtr<SkCanvas> canvas_; |
| 38 }; |
| 39 |
| 40 } // namespace cc |
| 41 |
| 42 #endif // CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_ |
OLD | NEW |