OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // content::SynchronousCompositor public API. This class effects an "inversion | 43 // content::SynchronousCompositor public API. This class effects an "inversion |
44 // of control" - enabling drawing to be orchestrated by the embedding | 44 // of control" - enabling drawing to be orchestrated by the embedding |
45 // layer, instead of driven by the compositor internals - hence it holds two | 45 // layer, instead of driven by the compositor internals - hence it holds two |
46 // 'client' pointers (|client_| in the OutputSurface baseclass and | 46 // 'client' pointers (|client_| in the OutputSurface baseclass and |
47 // GetDelegate()) which represent the consumers of the two roles in plays. | 47 // GetDelegate()) which represent the consumers of the two roles in plays. |
48 // This class can be created only on the main thread, but then becomes pinned | 48 // This class can be created only on the main thread, but then becomes pinned |
49 // to a fixed thread when BindToClient is called. | 49 // to a fixed thread when BindToClient is called. |
50 class SynchronousCompositorOutputSurface | 50 class SynchronousCompositorOutputSurface |
51 : NON_EXPORTED_BASE(public cc::OutputSurface) { | 51 : NON_EXPORTED_BASE(public cc::OutputSurface) { |
52 public: | 52 public: |
53 explicit SynchronousCompositorOutputSurface(int routing_id); | 53 SynchronousCompositorOutputSurface(int routing_id, |
| 54 size_t max_transfer_buffer_usage_bytes); |
54 virtual ~SynchronousCompositorOutputSurface(); | 55 virtual ~SynchronousCompositorOutputSurface(); |
55 | 56 |
56 // OutputSurface. | 57 // OutputSurface. |
57 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; | 58 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; |
58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; | 59 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; |
59 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; | 60 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; |
60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 61 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 62 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
62 | 63 |
63 // Partial SynchronousCompositor API implementation. | 64 // Partial SynchronousCompositor API implementation. |
(...skipping 25 matching lines...) Expand all Loading... |
89 | 90 |
90 // Only valid (non-NULL) during a DemandDrawSw() call. | 91 // Only valid (non-NULL) during a DemandDrawSw() call. |
91 SkCanvas* current_sw_canvas_; | 92 SkCanvas* current_sw_canvas_; |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 94 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
97 | 98 |
98 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 99 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
OLD | NEW |