Chromium Code Reviews| 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 "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "skia/ext/refptr.h" | 10 #include "skia/ext/refptr.h" |
| 11 // TODO(robertphillips): change this to "class SkBaseDevice;" | |
|
danakj
2013/08/22 19:48:30
How come this isn't possible right now?
robertphillips
2013/08/22 19:55:53
I'm trying to minimize the amount of work that nee
danakj
2013/08/22 19:56:44
I see, thanks. sg.
| |
| 12 #include "third_party/skia/include/core/SkDevice.h" | |
| 11 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
| 12 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 13 #include "ui/gfx/vector2d.h" | 15 #include "ui/gfx/vector2d.h" |
| 14 | 16 |
| 15 class SkBitmap; | 17 class SkBitmap; |
| 16 class SkDevice; | |
| 17 class SkCanvas; | 18 class SkCanvas; |
| 18 | 19 |
| 19 namespace cc { | 20 namespace cc { |
| 20 | 21 |
| 21 class SoftwareFrameData; | 22 class SoftwareFrameData; |
| 22 | 23 |
| 23 // This is a "tear-off" class providing software drawing support to | 24 // This is a "tear-off" class providing software drawing support to |
| 24 // OutputSurface, such as to a platform-provided window framebuffer. | 25 // OutputSurface, such as to a platform-provided window framebuffer. |
| 25 class CC_EXPORT SoftwareOutputDevice { | 26 class CC_EXPORT SoftwareOutputDevice { |
| 26 public: | 27 public: |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 39 | 40 |
| 40 virtual void DiscardBackbuffer() {} | 41 virtual void DiscardBackbuffer() {} |
| 41 virtual void EnsureBackbuffer() {} | 42 virtual void EnsureBackbuffer() {} |
| 42 | 43 |
| 43 // TODO(skaslev) Remove this after UberCompositor lands. | 44 // TODO(skaslev) Remove this after UberCompositor lands. |
| 44 virtual void ReclaimSoftwareFrame(unsigned id); | 45 virtual void ReclaimSoftwareFrame(unsigned id); |
| 45 | 46 |
| 46 protected: | 47 protected: |
| 47 gfx::Size viewport_size_; | 48 gfx::Size viewport_size_; |
| 48 gfx::Rect damage_rect_; | 49 gfx::Rect damage_rect_; |
| 49 skia::RefPtr<SkDevice> device_; | 50 skia::RefPtr<SkBaseDevice> device_; |
| 50 skia::RefPtr<SkCanvas> canvas_; | 51 skia::RefPtr<SkCanvas> canvas_; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); | 54 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace cc | 57 } // namespace cc |
| 57 | 58 |
| 58 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 59 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
| OLD | NEW |