| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
| 7 | 7 |
| 8 #include "android_webview/browser/shared_renderer_state.h" | 8 #include "android_webview/browser/shared_renderer_state.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/surfaces/display_client.h" | 11 #include "cc/surfaces/display_client.h" |
| 12 #include "cc/surfaces/surface_factory_client.h" | 12 #include "cc/surfaces/surface_factory_client.h" |
| 13 #include "cc/surfaces/surface_id.h" | 13 #include "cc/surfaces/surface_id.h" |
| 14 | 14 |
| 15 struct AwDrawGLInfo; | 15 struct AwDrawGLInfo; |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 class Display; | 18 class Display; |
| 19 class SurfaceFactory; | 19 class SurfaceFactory; |
| 20 class SurfaceIdAllocator; | 20 class SurfaceIdAllocator; |
| 21 class SurfaceManager; | 21 class SurfaceManager; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace android_webview { | 24 namespace android_webview { |
| 25 | 25 |
| 26 class AwGLSurface; | 26 class AwGLSurface; |
| 27 class ChildFrame; | 27 class ChildFrame; |
| 28 class ParentOutputSurface; | 28 class ParentOutputSurface; |
| 29 class ScopedAppGLStateRestore; |
| 29 | 30 |
| 30 class HardwareRenderer : public cc::DisplayClient, | 31 class HardwareRenderer : public cc::DisplayClient, |
| 31 public cc::SurfaceFactoryClient { | 32 public cc::SurfaceFactoryClient { |
| 32 public: | 33 public: |
| 33 explicit HardwareRenderer(SharedRendererState* state); | 34 explicit HardwareRenderer(SharedRendererState* state); |
| 34 ~HardwareRenderer() override; | 35 ~HardwareRenderer() override; |
| 35 | 36 |
| 36 void DrawGL(bool stencil_enabled, | 37 void DrawGL(AwDrawGLInfo* draw_info, const ScopedAppGLStateRestore& gl_state); |
| 37 AwDrawGLInfo* draw_info); | |
| 38 void CommitFrame(); | 38 void CommitFrame(); |
| 39 | 39 |
| 40 void SetBackingFrameBufferObject(int framebuffer_binding_ext); | 40 void SetBackingFrameBufferObject(int framebuffer_binding_ext); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // cc::DisplayClient overrides. | 43 // cc::DisplayClient overrides. |
| 44 void CommitVSyncParameters(base::TimeTicks timebase, | 44 void CommitVSyncParameters(base::TimeTicks timebase, |
| 45 base::TimeDelta interval) override {} | 45 base::TimeDelta interval) override {} |
| 46 void OutputSurfaceLost() override {} | 46 void OutputSurfaceLost() override {} |
| 47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} | 47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // This is owned by |display_|. | 84 // This is owned by |display_|. |
| 85 ParentOutputSurface* output_surface_; | 85 ParentOutputSurface* output_surface_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 87 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace android_webview | 90 } // namespace android_webview |
| 91 | 91 |
| 92 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 92 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
| OLD | NEW |