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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.h

Issue 1408123005: Android Webview IPC-based sync compositing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile Created 5 years, 1 month 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 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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H _ 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H _
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H _ 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H _
7 7
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "cc/blink/context_provider_web_context.h" 9 #include "cc/blink/context_provider_web_context.h"
10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" 10 #include "content/browser/android/in_process/synchronous_input_event_filter.h"
(...skipping 29 matching lines...) Expand all
40 override; 40 override;
41 scoped_ptr<cc::OutputSurface> CreateOutputSurface( 41 scoped_ptr<cc::OutputSurface> CreateOutputSurface(
42 int routing_id, 42 int routing_id,
43 const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue, 43 const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue,
44 const scoped_refptr<cc::ContextProvider>& onscreen_context, 44 const scoped_refptr<cc::ContextProvider>& onscreen_context,
45 const scoped_refptr<cc::ContextProvider>& worker_context) override; 45 const scoped_refptr<cc::ContextProvider>& worker_context) override;
46 InputHandlerManagerClient* GetInputHandlerManagerClient() override; 46 InputHandlerManagerClient* GetInputHandlerManagerClient() override;
47 scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( 47 scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
48 int routing_id) override; 48 int routing_id) override;
49 scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( 49 scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory(
50 int view_id) override; 50 int frame_id) override;
51 51
52 SynchronousInputEventFilter* synchronous_input_event_filter() { 52 SynchronousInputEventFilter* synchronous_input_event_filter() {
53 return &synchronous_input_event_filter_; 53 return &synchronous_input_event_filter_;
54 } 54 }
55 55
56 void SetDeferredGpuService( 56 void SetDeferredGpuService(
57 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); 57 scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
58 base::Thread* CreateInProcessGpuThread(
59 const InProcessChildThreadParams& params);
60 void CompositorInitializedHardwareDraw(); 58 void CompositorInitializedHardwareDraw();
61 void CompositorReleasedHardwareDraw(); 59 void CompositorReleasedHardwareDraw();
62 60
63 61
64 private: 62 private:
65 scoped_refptr<cc::ContextProvider> GetSharedWorkerContextProvider(); 63 scoped_refptr<cc::ContextProvider> GetSharedWorkerContextProvider();
66 bool CanCreateMainThreadContext(); 64 bool CanCreateMainThreadContext();
67 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> 65 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider>
68 TryCreateStreamTextureFactory(); 66 TryCreateStreamTextureFactory();
69 void RestoreContextOnMainThread(); 67 void RestoreContextOnMainThread();
70 68
71 SynchronousInputEventFilter synchronous_input_event_filter_; 69 SynchronousInputEventFilter synchronous_input_event_filter_;
72 70
73 scoped_refptr<gpu::InProcessCommandBuffer::Service> android_view_service_; 71 scoped_refptr<gpu::InProcessCommandBuffer::Service> android_view_service_;
74 72
75 class VideoContextProvider; 73 class VideoContextProvider;
76 scoped_refptr<VideoContextProvider> video_context_provider_; 74 scoped_refptr<VideoContextProvider> video_context_provider_;
77 75
78 // |num_hardware_compositor_lock_| is updated on UI thread only but can be 76 // |num_hardware_compositor_lock_| is updated on UI thread only but can be
79 // read on renderer main thread. 77 // read on renderer main thread.
80 base::Lock num_hardware_compositor_lock_; 78 base::Lock num_hardware_compositor_lock_;
81 unsigned int num_hardware_compositors_; 79 unsigned int num_hardware_compositors_;
82 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 80 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
83 }; 81 };
84 82
85 } // namespace content 83 } // namespace content
86 84
87 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP L_H_ 85 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP L_H_
OLDNEW
« no previous file with comments | « content/browser/android/in_process/DEPS ('k') | content/browser/android/in_process/synchronous_compositor_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698