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

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

Issue 1193303002: base/threading: restrict to set only current thread priority (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: two more android fix and review #2 Created 5 years, 6 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<FrameSwapMessageQueue> 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 #if defined(OS_ANDROID)
57 // TODO(epenner): This seems out of place here and would be a better fit 58 // 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) 59 // int CompositorThread after it is fully refactored (http://crbug/170828)
59 void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override; 60 void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override;
61 #endif
60 62
61 protected: 63 protected:
62 void ShortcutSwapAck(uint32 output_surface_id, 64 void ShortcutSwapAck(uint32 output_surface_id,
63 scoped_ptr<cc::GLFrameData> gl_frame_data, 65 scoped_ptr<cc::GLFrameData> gl_frame_data,
64 scoped_ptr<cc::SoftwareFrameData> software_frame_data); 66 scoped_ptr<cc::SoftwareFrameData> software_frame_data);
65 virtual void OnSwapAck(uint32 output_surface_id, 67 virtual void OnSwapAck(uint32 output_surface_id,
66 const cc::CompositorFrameAck& ack); 68 const cc::CompositorFrameAck& ack);
67 virtual void OnReclaimResources(uint32 output_surface_id, 69 virtual void OnReclaimResources(uint32 output_surface_id,
68 const cc::CompositorFrameAck& ack); 70 const cc::CompositorFrameAck& ack);
69 uint32 output_surface_id_; 71 uint32 output_surface_id_;
(...skipping 25 matching lines...) Expand all
95 bool Send(IPC::Message* message); 97 bool Send(IPC::Message* message);
96 98
97 bool use_swap_compositor_frame_message_; 99 bool use_swap_compositor_frame_message_;
98 100
99 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_; 101 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_;
100 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_; 102 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_;
101 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 103 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
102 scoped_refptr<IPC::SyncMessageFilter> message_sender_; 104 scoped_refptr<IPC::SyncMessageFilter> message_sender_;
103 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; 105 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
104 int routing_id_; 106 int routing_id_;
107 #if defined(OS_ANDROID)
105 bool prefers_smoothness_; 108 bool prefers_smoothness_;
106 base::PlatformThreadHandle main_thread_handle_; 109 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
gab 2015/06/23 17:01:32 Please keep logic changes to another CL here as we
Ken Russell (switch to Gerrit) 2015/06/23 21:08:40 I agree with gab's assessment.
Takashi Toyoshima 2015/06/24 04:15:39 Done.
110 #endif
107 111
108 // TODO(danakj): Remove this when crbug.com/311404 112 // TODO(danakj): Remove this when crbug.com/311404
109 bool layout_test_mode_; 113 bool layout_test_mode_;
110 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; 114 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_;
111 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; 115 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_;
112 }; 116 };
113 117
114 } // namespace content 118 } // namespace content
115 119
116 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 120 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698