| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // GetDelegate()) which represent the consumers of the two roles in plays. | 48 // GetDelegate()) which represent the consumers of the two roles in plays. |
| 49 // This class can be created only on the main thread, but then becomes pinned | 49 // This class can be created only on the main thread, but then becomes pinned |
| 50 // to a fixed thread when BindToClient is called. | 50 // to a fixed thread when BindToClient is called. |
| 51 class SynchronousCompositorOutputSurface | 51 class SynchronousCompositorOutputSurface |
| 52 : NON_EXPORTED_BASE(public cc::OutputSurface) { | 52 : NON_EXPORTED_BASE(public cc::OutputSurface) { |
| 53 public: | 53 public: |
| 54 explicit SynchronousCompositorOutputSurface(int routing_id); | 54 explicit SynchronousCompositorOutputSurface(int routing_id); |
| 55 virtual ~SynchronousCompositorOutputSurface(); | 55 virtual ~SynchronousCompositorOutputSurface(); |
| 56 | 56 |
| 57 // OutputSurface. | 57 // OutputSurface. |
| 58 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; | |
| 59 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; | 58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; |
| 60 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; | 59 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; |
| 61 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
| 62 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| 63 | 62 |
| 64 // Partial SynchronousCompositor API implementation. | 63 // Partial SynchronousCompositor API implementation. |
| 65 bool InitializeHwDraw( | 64 bool InitializeHwDraw( |
| 66 scoped_refptr<cc::ContextProvider> onscreen_context_provider); | 65 scoped_refptr<cc::ContextProvider> onscreen_context_provider); |
| 67 void ReleaseHwDraw(); | 66 void ReleaseHwDraw(); |
| 68 scoped_ptr<cc::CompositorFrame> DemandDrawHw(gfx::Size surface_size, | 67 scoped_ptr<cc::CompositorFrame> DemandDrawHw(gfx::Size surface_size, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 99 | 98 |
| 100 cc::OutputSurfaceClient* output_surface_client_; | 99 cc::OutputSurfaceClient* output_surface_client_; |
| 101 scoped_ptr<cc::CompositorFrame> frame_holder_; | 100 scoped_ptr<cc::CompositorFrame> frame_holder_; |
| 102 | 101 |
| 103 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 102 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 } // namespace content | 105 } // namespace content |
| 107 | 106 |
| 108 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 107 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
| OLD | NEW |