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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) Created 5 years, 7 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 "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 13 matching lines...) Expand all
24 24
25 namespace cc { 25 namespace cc {
26 class CompositorFrame; 26 class CompositorFrame;
27 class CompositorFrameAck; 27 class CompositorFrameAck;
28 class GLFrameData; 28 class GLFrameData;
29 class SoftwareFrameData; 29 class SoftwareFrameData;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 class ContextProviderCommandBuffer; 33 class ContextProviderCommandBuffer;
34 class FrameSwapMessageQueue; 34 class FrameUpdateMessageQueue;
35 35
36 // This class can be created only on the main thread, but then becomes pinned 36 // This class can be created only on the main thread, but then becomes pinned
37 // to a fixed thread when bindToClient is called. 37 // to a fixed thread when bindToClient is called.
38 class CompositorOutputSurface 38 class CompositorOutputSurface
39 : NON_EXPORTED_BASE(public cc::OutputSurface), 39 : NON_EXPORTED_BASE(public cc::OutputSurface),
40 NON_EXPORTED_BASE(public base::NonThreadSafe) { 40 NON_EXPORTED_BASE(public base::NonThreadSafe) {
41 public: 41 public:
42 CompositorOutputSurface( 42 CompositorOutputSurface(
43 int32 routing_id, 43 int32 routing_id,
44 uint32 output_surface_id, 44 uint32 output_surface_id,
45 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, 45 const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
46 const scoped_refptr<ContextProviderCommandBuffer>& 46 const scoped_refptr<ContextProviderCommandBuffer>&
47 worker_context_provider, 47 worker_context_provider,
48 scoped_ptr<cc::SoftwareOutputDevice> software, 48 scoped_ptr<cc::SoftwareOutputDevice> software,
49 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue, 49 scoped_refptr<FrameUpdateMessageQueue> swap_frame_message_queue,
50 bool use_swap_compositor_frame_message); 50 bool use_swap_compositor_frame_message);
51 ~CompositorOutputSurface() override; 51 ~CompositorOutputSurface() override;
52 52
53 // cc::OutputSurface implementation. 53 // cc::OutputSurface implementation.
54 bool BindToClient(cc::OutputSurfaceClient* client) override; 54 bool BindToClient(cc::OutputSurfaceClient* client) override;
55 void SwapBuffers(cc::CompositorFrame* frame) override; 55 void SwapBuffers(cc::CompositorFrame* frame) override;
56 56
57 // TODO(epenner): This seems out of place here and would be a better fit 57 // TODO(epenner): This seems out of place here and would be a better fit
58 // int CompositorThread after it is fully refactored (http://crbug/170828) 58 // int CompositorThread after it is fully refactored (http://crbug/170828)
59 void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override; 59 void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void OnUpdateVSyncParametersFromBrowser(base::TimeTicks timebase, 93 void OnUpdateVSyncParametersFromBrowser(base::TimeTicks timebase,
94 base::TimeDelta interval); 94 base::TimeDelta interval);
95 bool Send(IPC::Message* message); 95 bool Send(IPC::Message* message);
96 96
97 bool use_swap_compositor_frame_message_; 97 bool use_swap_compositor_frame_message_;
98 98
99 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_; 99 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_;
100 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_; 100 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_;
101 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 101 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
102 scoped_refptr<IPC::SyncMessageFilter> message_sender_; 102 scoped_refptr<IPC::SyncMessageFilter> message_sender_;
103 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; 103 scoped_refptr<FrameUpdateMessageQueue> frame_update_message_queue_;
104 int routing_id_; 104 int routing_id_;
105 bool prefers_smoothness_; 105 bool prefers_smoothness_;
106 base::PlatformThreadHandle main_thread_handle_; 106 base::PlatformThreadHandle main_thread_handle_;
107 107
108 // TODO(danakj): Remove this when crbug.com/311404 108 // TODO(danakj): Remove this when crbug.com/311404
109 bool layout_test_mode_; 109 bool layout_test_mode_;
110 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; 110 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_;
111 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; 111 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_;
112 }; 112 };
113 113
114 } // namespace content 114 } // namespace content
115 115
116 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 116 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698