Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: content/renderer/gpu/compositor_output_surface.h

Issue 2299003002: Remove uses of external begin frame sources (Closed)
Patch Set: Remove Blimp conditional Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "base/threading/platform_thread.h" 17 #include "base/threading/platform_thread.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "cc/output/begin_frame_args.h" 20 #include "cc/output/begin_frame_args.h"
21 #include "cc/output/output_surface.h" 21 #include "cc/output/output_surface.h"
22 #include "cc/scheduler/begin_frame_source.h"
22 #include "content/renderer/gpu/compositor_forwarding_message_filter.h" 23 #include "content/renderer/gpu/compositor_forwarding_message_filter.h"
23 #include "ipc/ipc_sync_message_filter.h" 24 #include "ipc/ipc_sync_message_filter.h"
24 25
25 namespace IPC { 26 namespace IPC {
26 class Message; 27 class Message;
27 } 28 }
28 29
29 namespace cc { 30 namespace cc {
30 class CompositorFrame; 31 class CompositorFrame;
31 class CompositorFrameAck; 32 class CompositorFrameAck;
32 class ContextProvider; 33 class ContextProvider;
33 } 34 }
34 35
35 namespace content { 36 namespace content {
36 class FrameSwapMessageQueue; 37 class FrameSwapMessageQueue;
37 38
38 // This class can be created only on the main thread, but then becomes pinned 39 // This class can be created only on the main thread, but then becomes pinned
39 // to a fixed thread when BindToClient is called. 40 // to a fixed thread when BindToClient is called.
40 class CompositorOutputSurface 41 class CompositorOutputSurface
41 : NON_EXPORTED_BASE(public cc::OutputSurface), 42 : NON_EXPORTED_BASE(public cc::OutputSurface),
42 NON_EXPORTED_BASE(public base::NonThreadSafe) { 43 NON_EXPORTED_BASE(public base::NonThreadSafe) {
43 public: 44 public:
44 CompositorOutputSurface( 45 CompositorOutputSurface(
45 int32_t routing_id, 46 int32_t routing_id,
46 uint32_t output_surface_id, 47 uint32_t output_surface_id,
48 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
47 scoped_refptr<cc::ContextProvider> context_provider, 49 scoped_refptr<cc::ContextProvider> context_provider,
48 scoped_refptr<cc::ContextProvider> worker_context_provider, 50 scoped_refptr<cc::ContextProvider> worker_context_provider,
49 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue); 51 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue);
50 CompositorOutputSurface( 52 CompositorOutputSurface(
51 int32_t routing_id, 53 int32_t routing_id,
52 uint32_t output_surface_id, 54 uint32_t output_surface_id,
55 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
53 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, 56 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
54 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue); 57 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue);
55 ~CompositorOutputSurface() override; 58 ~CompositorOutputSurface() override;
56 59
57 // cc::OutputSurface implementation. 60 // cc::OutputSurface implementation.
58 bool BindToClient(cc::OutputSurfaceClient* client) override; 61 bool BindToClient(cc::OutputSurfaceClient* client) override;
59 void DetachFromClient() override; 62 void DetachFromClient() override;
60 void SwapBuffers(cc::CompositorFrame frame) override; 63 void SwapBuffers(cc::CompositorFrame frame) override;
61 void BindFramebuffer() override; 64 void BindFramebuffer() override;
62 uint32_t GetFramebufferCopyTextureFormat() override; 65 uint32_t GetFramebufferCopyTextureFormat() override;
(...skipping 26 matching lines...) Expand all
89 void OnReclaimCompositorResources(uint32_t output_surface_id, 92 void OnReclaimCompositorResources(uint32_t output_surface_id,
90 bool is_swap_ack, 93 bool is_swap_ack,
91 const cc::ReturnedResourceArray& resources); 94 const cc::ReturnedResourceArray& resources);
92 bool Send(IPC::Message* message); 95 bool Send(IPC::Message* message);
93 96
94 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_; 97 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_;
95 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_; 98 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_;
96 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 99 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
97 scoped_refptr<IPC::SyncMessageFilter> message_sender_; 100 scoped_refptr<IPC::SyncMessageFilter> message_sender_;
98 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; 101 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
102 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_;
99 int routing_id_; 103 int routing_id_;
100 }; 104 };
101 105
102 } // namespace content 106 } // namespace content
103 107
104 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 108 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_dependencies.h ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698