| 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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // OutputSurface. | 47 // OutputSurface. |
| 48 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; | 48 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; |
| 49 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; | 49 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; |
| 50 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; | 50 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; |
| 51 virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE; | 51 virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE; |
| 52 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 52 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
| 53 virtual void SwapBuffers(const ui::LatencyInfo& info) OVERRIDE; | 53 virtual void SwapBuffers(const ui::LatencyInfo& info) OVERRIDE; |
| 54 | 54 |
| 55 // Partial SynchronousCompositor API implementation. | 55 // Partial SynchronousCompositor API implementation. |
| 56 bool IsHwReady(); | |
| 57 bool DemandDrawSw(SkCanvas* canvas); | 56 bool DemandDrawSw(SkCanvas* canvas); |
| 57 bool InitializeHwDraw() OVERRIDE; |
| 58 bool DemandDrawHw(gfx::Size surface_size, | 58 bool DemandDrawHw(gfx::Size surface_size, |
| 59 const gfx::Transform& transform, | 59 const gfx::Transform& transform, |
| 60 gfx::Rect clip); | 60 gfx::Rect clip); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 class SoftwareDevice; | 63 class SoftwareDevice; |
| 64 friend class SoftwareDevice; | 64 friend class SoftwareDevice; |
| 65 | 65 |
| 66 void InvokeComposite(gfx::Size damage_size); | 66 void InvokeComposite(gfx::Size damage_size); |
| 67 void UpdateCompositorClientSettings(); | 67 void UpdateCompositorClientSettings(); |
| 68 void NotifyCompositorSettingsChanged(); | 68 void NotifyCompositorSettingsChanged(); |
| 69 bool CalledOnValidThread() const; | 69 bool CalledOnValidThread() const; |
| 70 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); | 70 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); |
| 71 | 71 |
| 72 int routing_id_; | 72 int routing_id_; |
| 73 bool needs_begin_frame_; | 73 bool needs_begin_frame_; |
| 74 bool did_swap_buffer_; | 74 bool did_swap_buffer_; |
| 75 | 75 |
| 76 // Only valid (non-NULL) during a DemandDrawSw() call. | 76 // Only valid (non-NULL) during a DemandDrawSw() call. |
| 77 SkCanvas* current_sw_canvas_; | 77 SkCanvas* current_sw_canvas_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 79 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace content | 82 } // namespace content |
| 83 | 83 |
| 84 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 84 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
| OLD | NEW |