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" | 10 #include "cc/base/cc_export.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // SkCanvas instance returned by |BeginPaint| and should discard any reference | 48 // SkCanvas instance returned by |BeginPaint| and should discard any reference |
49 // that it holds to it. | 49 // that it holds to it. |
50 virtual void EndPaint(SoftwareFrameData* frame_data); | 50 virtual void EndPaint(SoftwareFrameData* frame_data); |
51 | 51 |
52 // Copies pixels inside |rect| from the current software framebuffer to | 52 // Copies pixels inside |rect| from the current software framebuffer to |
53 // |output|. Fails if there is no current softwareframebuffer. | 53 // |output|. Fails if there is no current softwareframebuffer. |
54 virtual void CopyToBitmap(const gfx::Rect& rect, SkBitmap* output); | 54 virtual void CopyToBitmap(const gfx::Rect& rect, SkBitmap* output); |
55 | 55 |
56 // Blit the pixel content of the SoftwareOutputDevice by |delta| with the | 56 // Blit the pixel content of the SoftwareOutputDevice by |delta| with the |
57 // write clipped to |clip_rect|. | 57 // write clipped to |clip_rect|. |
58 virtual void Scroll(gfx::Vector2d delta, | 58 virtual void Scroll(const gfx::Vector2d& delta, const gfx::Rect& clip_rect); |
59 const gfx::Rect& clip_rect); | |
60 | 59 |
61 // Discard the backing buffer in the surface provided by this instance. | 60 // Discard the backing buffer in the surface provided by this instance. |
62 virtual void DiscardBackbuffer() {} | 61 virtual void DiscardBackbuffer() {} |
63 | 62 |
64 // Ensures that there is a backing buffer available on this instance. | 63 // Ensures that there is a backing buffer available on this instance. |
65 virtual void EnsureBackbuffer() {} | 64 virtual void EnsureBackbuffer() {} |
66 | 65 |
67 // TODO(skaslev) Remove this after UberCompositor lands. | 66 // TODO(skaslev) Remove this after UberCompositor lands. |
68 // Called in response to receiving a SwapBuffersAck. At this point, software | 67 // Called in response to receiving a SwapBuffersAck. At this point, software |
69 // frame identified by id can be reused or discarded as it is no longer being | 68 // frame identified by id can be reused or discarded as it is no longer being |
(...skipping 11 matching lines...) Expand all Loading... |
81 skia::RefPtr<SkCanvas> canvas_; | 80 skia::RefPtr<SkCanvas> canvas_; |
82 scoped_ptr<gfx::VSyncProvider> vsync_provider_; | 81 scoped_ptr<gfx::VSyncProvider> vsync_provider_; |
83 | 82 |
84 private: | 83 private: |
85 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); | 84 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); |
86 }; | 85 }; |
87 | 86 |
88 } // namespace cc | 87 } // namespace cc |
89 | 88 |
90 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ | 89 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ |
OLD | NEW |