| 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/compositor_id.h" | 10 #include "android_webview/browser/compositor_id.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "cc/surfaces/surface_factory_client.h" | 14 #include "cc/surfaces/surface_factory_client.h" |
| 14 #include "cc/surfaces/surface_id.h" | 15 #include "cc/surfaces/surface_id.h" |
| 16 #include "content/public/browser/android/synchronous_compositor.h" |
| 15 | 17 |
| 16 struct AwDrawGLInfo; | 18 struct AwDrawGLInfo; |
| 17 | 19 |
| 18 namespace cc { | 20 namespace cc { |
| 19 class Display; | 21 class Display; |
| 20 class SurfaceFactory; | 22 class SurfaceFactory; |
| 21 class SurfaceIdAllocator; | 23 class SurfaceIdAllocator; |
| 22 class SurfaceManager; | 24 class SurfaceManager; |
| 23 } | 25 } |
| 24 | 26 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 gfx::Size frame_size_; | 60 gfx::Size frame_size_; |
| 59 | 61 |
| 60 // Infromation from UI on last commit. | 62 // Infromation from UI on last commit. |
| 61 gfx::Vector2d scroll_offset_; | 63 gfx::Vector2d scroll_offset_; |
| 62 | 64 |
| 63 // This holds the last ChildFrame received. Contains the frame info of the | 65 // This holds the last ChildFrame received. Contains the frame info of the |
| 64 // last frame. The |frame| member may be null if it's already submitted to | 66 // last frame. The |frame| member may be null if it's already submitted to |
| 65 // SurfaceFactory. | 67 // SurfaceFactory. |
| 66 std::unique_ptr<ChildFrame> child_frame_; | 68 std::unique_ptr<ChildFrame> child_frame_; |
| 67 | 69 |
| 70 scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future_; |
| 71 |
| 68 const scoped_refptr<SurfacesInstance> surfaces_; | 72 const scoped_refptr<SurfacesInstance> surfaces_; |
| 69 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 73 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
| 70 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 74 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 71 cc::SurfaceId child_id_; | 75 cc::SurfaceId child_id_; |
| 72 CompositorID compositor_id_; | 76 CompositorID compositor_id_; |
| 73 // HardwareRenderer guarantees resources are returned in the order of | 77 // HardwareRenderer guarantees resources are returned in the order of |
| 74 // compositor_frame_sink_id, and resources for old output surfaces are | 78 // compositor_frame_sink_id, and resources for old output surfaces are |
| 75 // dropped. | 79 // dropped. |
| 76 uint32_t last_committed_compositor_frame_sink_id_; | 80 uint32_t last_committed_compositor_frame_sink_id_; |
| 77 uint32_t last_submitted_compositor_frame_sink_id_; | 81 uint32_t last_submitted_compositor_frame_sink_id_; |
| 78 | 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 83 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace android_webview | 86 } // namespace android_webview |
| 83 | 87 |
| 84 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 88 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
| OLD | NEW |