| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
| 11 #include "android_webview/browser/compositor_id.h" | 11 #include "android_webview/browser/compositor_id.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "cc/surfaces/frame_sink_id.h" | 14 #include "cc/surfaces/frame_sink_id.h" |
| 15 #include "cc/surfaces/surface_factory_client.h" | 15 #include "cc/surfaces/surface_factory_client.h" |
| 16 #include "cc/surfaces/surface_id.h" | 16 #include "cc/surfaces/surface_id.h" |
| 17 | 17 |
| 18 struct AwDrawGLInfo; | 18 struct AwDrawGLInfo; |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 class SurfaceFactory; | 21 class SurfaceFactory; |
| 22 class SurfaceIdAllocator; | 22 class LocalSurfaceIdAllocator; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace android_webview { | 25 namespace android_webview { |
| 26 | 26 |
| 27 class ChildFrame; | 27 class ChildFrame; |
| 28 class RenderThreadManager; | 28 class RenderThreadManager; |
| 29 class SurfacesInstance; | 29 class SurfacesInstance; |
| 30 | 30 |
| 31 class HardwareRenderer : public cc::SurfaceFactoryClient { | 31 class HardwareRenderer : public cc::SurfaceFactoryClient { |
| 32 public: | 32 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 ChildFrameQueue child_frame_queue_; | 75 ChildFrameQueue child_frame_queue_; |
| 76 | 76 |
| 77 // This holds the last ChildFrame received. Contains the frame info of the | 77 // This holds the last ChildFrame received. Contains the frame info of the |
| 78 // last frame. The |frame| member is always null since frame has already | 78 // last frame. The |frame| member is always null since frame has already |
| 79 // been submitted. | 79 // been submitted. |
| 80 std::unique_ptr<ChildFrame> child_frame_; | 80 std::unique_ptr<ChildFrame> child_frame_; |
| 81 | 81 |
| 82 const scoped_refptr<SurfacesInstance> surfaces_; | 82 const scoped_refptr<SurfacesInstance> surfaces_; |
| 83 cc::FrameSinkId frame_sink_id_; | 83 cc::FrameSinkId frame_sink_id_; |
| 84 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 84 const std::unique_ptr<cc::LocalSurfaceIdAllocator> |
| 85 local_surface_id_allocator_; |
| 85 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 86 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 86 cc::LocalSurfaceId child_id_; | 87 cc::LocalSurfaceId child_id_; |
| 87 CompositorID compositor_id_; | 88 CompositorID compositor_id_; |
| 88 // HardwareRenderer guarantees resources are returned in the order of | 89 // HardwareRenderer guarantees resources are returned in the order of |
| 89 // compositor_frame_sink_id, and resources for old output surfaces are | 90 // compositor_frame_sink_id, and resources for old output surfaces are |
| 90 // dropped. | 91 // dropped. |
| 91 uint32_t last_committed_compositor_frame_sink_id_; | 92 uint32_t last_committed_compositor_frame_sink_id_; |
| 92 uint32_t last_submitted_compositor_frame_sink_id_; | 93 uint32_t last_submitted_compositor_frame_sink_id_; |
| 93 | 94 |
| 94 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 95 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace android_webview | 98 } // namespace android_webview |
| 98 | 99 |
| 99 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 100 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
| OLD | NEW |