OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ |
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ | 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // to a fixed thread when BindToClient is called. | 21 // to a fixed thread when BindToClient is called. |
22 class CompositorSoftwareOutputDevice | 22 class CompositorSoftwareOutputDevice |
23 : NON_EXPORTED_BASE(public cc::SoftwareOutputDevice), | 23 : NON_EXPORTED_BASE(public cc::SoftwareOutputDevice), |
24 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 24 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
25 public: | 25 public: |
26 CompositorSoftwareOutputDevice(); | 26 CompositorSoftwareOutputDevice(); |
27 virtual ~CompositorSoftwareOutputDevice(); | 27 virtual ~CompositorSoftwareOutputDevice(); |
28 | 28 |
29 virtual void Resize(gfx::Size size) OVERRIDE; | 29 virtual void Resize(gfx::Size size) OVERRIDE; |
30 | 30 |
31 virtual SkCanvas* BeginPaint(gfx::Rect damage_rect) OVERRIDE; | 31 virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE; |
32 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE; | 32 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE; |
33 virtual void EnsureBackbuffer() OVERRIDE; | 33 virtual void EnsureBackbuffer() OVERRIDE; |
34 virtual void DiscardBackbuffer() OVERRIDE; | 34 virtual void DiscardBackbuffer() OVERRIDE; |
35 | 35 |
36 virtual void ReclaimSoftwareFrame(unsigned id) OVERRIDE; | 36 virtual void ReclaimSoftwareFrame(unsigned id) OVERRIDE; |
37 | 37 |
38 private: | 38 private: |
39 // Internal buffer class that manages shared memory lifetime and ownership. | 39 // Internal buffer class that manages shared memory lifetime and ownership. |
40 // It also tracks buffers' history so we can calculate what's the minimum | 40 // It also tracks buffers' history so we can calculate what's the minimum |
41 // damage rect difference between any two given buffers (see SetParent and | 41 // damage rect difference between any two given buffers (see SetParent and |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 unsigned next_buffer_id_; | 89 unsigned next_buffer_id_; |
90 ScopedVector<Buffer> buffers_; | 90 ScopedVector<Buffer> buffers_; |
91 ScopedVector<Buffer> awaiting_ack_; | 91 ScopedVector<Buffer> awaiting_ack_; |
92 SkBitmap bitmap_; | 92 SkBitmap bitmap_; |
93 RenderThread* render_thread_; | 93 RenderThread* render_thread_; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace content | 96 } // namespace content |
97 | 97 |
98 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ | 98 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ |
OLD | NEW |