| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual ~SynchronousCompositorOutputSurface(); | 54 virtual ~SynchronousCompositorOutputSurface(); |
| 55 | 55 |
| 56 // OutputSurface. | 56 // OutputSurface. |
| 57 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; | 57 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; |
| 58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; | 58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; |
| 59 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; | 59 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; |
| 60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
| 61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
| 62 | 62 |
| 63 // Partial SynchronousCompositor API implementation. | 63 // Partial SynchronousCompositor API implementation. |
| 64 bool InitializeHwDraw(scoped_refptr<cc::ContextProvider> offscreen_context); | 64 bool InitializeHwDraw( |
| 65 scoped_refptr<gfx::GLSurface> surface, |
| 66 scoped_refptr<cc::ContextProvider> offscreen_context); |
| 65 void ReleaseHwDraw(); | 67 void ReleaseHwDraw(); |
| 66 bool DemandDrawHw(gfx::Size surface_size, | 68 bool DemandDrawHw(gfx::Size surface_size, |
| 67 const gfx::Transform& transform, | 69 const gfx::Transform& transform, |
| 68 gfx::Rect clip, | 70 gfx::Rect clip, |
| 69 bool stencil_enabled); | 71 bool stencil_enabled); |
| 70 bool DemandDrawSw(SkCanvas* canvas); | 72 bool DemandDrawSw(SkCanvas* canvas); |
| 71 | 73 |
| 72 private: | 74 private: |
| 73 class SoftwareDevice; | 75 class SoftwareDevice; |
| 74 friend class SoftwareDevice; | 76 friend class SoftwareDevice; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 87 | 89 |
| 88 // Only valid (non-NULL) during a DemandDrawSw() call. | 90 // Only valid (non-NULL) during a DemandDrawSw() call. |
| 89 SkCanvas* current_sw_canvas_; | 91 SkCanvas* current_sw_canvas_; |
| 90 | 92 |
| 91 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 93 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 } // namespace content | 96 } // namespace content |
| 95 | 97 |
| 96 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 98 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
| OLD | NEW |