OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 5 #ifndef CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | |
11 #include "skia/ext/refptr.h" | 10 #include "skia/ext/refptr.h" |
12 #include "third_party/skia/include/core/SkSurface.h" | 11 #include "third_party/skia/include/core/SkSurface.h" |
13 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
15 #include "ui/gfx/geometry/vector2d.h" | 14 #include "ui/gfx/geometry/vector2d.h" |
16 | 15 |
17 class SkBitmap; | 16 class SkBitmap; |
18 class SkCanvas; | 17 class SkCanvas; |
19 | 18 |
20 namespace gfx { | 19 namespace gfx { |
21 class VSyncProvider; | 20 class VSyncProvider; |
22 } | 21 } |
23 | 22 |
24 namespace cc { | 23 namespace cc { |
25 | 24 |
26 class SoftwareFrameData; | 25 class SoftwareFrameData; |
27 | 26 |
28 // This is a "tear-off" class providing software drawing support to | 27 // This is a "tear-off" class providing software drawing support to |
29 // OutputSurface, such as to a platform-provided window framebuffer. | 28 // OutputSurface, such as to a platform-provided window framebuffer. |
30 class CC_EXPORT SoftwareOutputDevice { | 29 class SoftwareOutputDevice { |
31 public: | 30 public: |
32 SoftwareOutputDevice(); | 31 SoftwareOutputDevice(); |
33 virtual ~SoftwareOutputDevice(); | 32 virtual ~SoftwareOutputDevice(); |
34 | 33 |
35 // Discards any pre-existing backing buffers and allocates memory for a | 34 // Discards any pre-existing backing buffers and allocates memory for a |
36 // software device of |size|. This must be called before the | 35 // software device of |size|. This must be called before the |
37 // |SoftwareOutputDevice| can be used in other ways. | 36 // |SoftwareOutputDevice| can be used in other ways. |
38 virtual void Resize(const gfx::Size& pixel_size, float scale_factor); | 37 virtual void Resize(const gfx::Size& pixel_size, float scale_factor); |
39 | 38 |
40 // Called on BeginDrawingFrame. The compositor will draw into the returned | 39 // Called on BeginDrawingFrame. The compositor will draw into the returned |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 skia::RefPtr<SkSurface> surface_; | 78 skia::RefPtr<SkSurface> surface_; |
80 scoped_ptr<gfx::VSyncProvider> vsync_provider_; | 79 scoped_ptr<gfx::VSyncProvider> vsync_provider_; |
81 | 80 |
82 private: | 81 private: |
83 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); | 82 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace cc | 85 } // namespace cc |
87 | 86 |
88 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 87 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
OLD | NEW |