| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "cc/output/managed_memory_policy.h" | 12 #include "cc/output/managed_memory_policy.h" |
| 13 #include "cc/output/output_surface.h" | 13 #include "cc/output/output_surface.h" |
| 14 #include "content/public/browser/android/synchronous_compositor.h" | 14 #include "content/public/browser/android/synchronous_compositor.h" |
| 15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 class ContextProvider; | 18 class ContextProvider; |
| 19 class CompositorFrameMetadata; | 19 class CompositorFrameMetadata; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace gpu { |
| 23 class GLInProcessContext; |
| 24 } |
| 25 |
| 22 namespace content { | 26 namespace content { |
| 23 | 27 |
| 24 class SynchronousCompositorClient; | 28 class SynchronousCompositorClient; |
| 25 class SynchronousCompositorOutputSurface; | 29 class SynchronousCompositorOutputSurface; |
| 26 class WebGraphicsContext3DCommandBufferImpl; | 30 class WebGraphicsContext3DCommandBufferImpl; |
| 27 | 31 |
| 28 class SynchronousCompositorOutputSurfaceDelegate { | 32 class SynchronousCompositorOutputSurfaceDelegate { |
| 29 public: | 33 public: |
| 30 virtual void DidBindOutputSurface( | 34 virtual void DidBindOutputSurface( |
| 31 SynchronousCompositorOutputSurface* output_surface) = 0; | 35 SynchronousCompositorOutputSurface* output_surface) = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 58 // OutputSurface. | 62 // OutputSurface. |
| 59 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; | 63 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; |
| 60 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; | 64 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; |
| 61 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; | 65 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; |
| 62 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; | 66 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; |
| 63 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 67 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| 64 | 68 |
| 65 // Partial SynchronousCompositor API implementation. | 69 // Partial SynchronousCompositor API implementation. |
| 66 bool InitializeHwDraw( | 70 bool InitializeHwDraw( |
| 67 scoped_refptr<gfx::GLSurface> surface, | 71 scoped_refptr<gfx::GLSurface> surface, |
| 68 scoped_refptr<cc::ContextProvider> offscreen_context_provider); | 72 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, |
| 73 scoped_refptr<cc::ContextProvider> offscreen_context_provider, |
| 74 gpu::GLInProcessContext* share_context); |
| 69 void ReleaseHwDraw(); | 75 void ReleaseHwDraw(); |
| 70 bool DemandDrawHw(gfx::Size surface_size, | 76 bool DemandDrawHw(gfx::Size surface_size, |
| 71 const gfx::Transform& transform, | 77 const gfx::Transform& transform, |
| 72 gfx::Rect viewport, | 78 gfx::Rect viewport, |
| 73 gfx::Rect clip, | 79 gfx::Rect clip, |
| 74 bool stencil_enabled); | 80 bool stencil_enabled); |
| 75 bool DemandDrawSw(SkCanvas* canvas); | 81 bool DemandDrawSw(SkCanvas* canvas); |
| 76 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); | 82 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); |
| 77 | 83 |
| 78 private: | 84 private: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 104 cc::ManagedMemoryPolicy memory_policy_; | 110 cc::ManagedMemoryPolicy memory_policy_; |
| 105 | 111 |
| 106 cc::OutputSurfaceClient* output_surface_client_; | 112 cc::OutputSurfaceClient* output_surface_client_; |
| 107 | 113 |
| 108 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 114 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 109 }; | 115 }; |
| 110 | 116 |
| 111 } // namespace content | 117 } // namespace content |
| 112 | 118 |
| 113 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 119 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
| OLD | NEW |