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

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

Issue 389973005: Merge 280970 "Add switch to disable recording whole document" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 "content/browser/android/in_process/synchronous_input_event_filter.h" 9 #include "content/browser/android/in_process/synchronous_input_event_filter.h"
10 #include "content/renderer/android/synchronous_compositor_factory.h" 10 #include "content/renderer/android/synchronous_compositor_factory.h"
(...skipping 14 matching lines...) Expand all
25 namespace content { 25 namespace content {
26 26
27 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { 27 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory {
28 public: 28 public:
29 SynchronousCompositorFactoryImpl(); 29 SynchronousCompositorFactoryImpl();
30 virtual ~SynchronousCompositorFactoryImpl(); 30 virtual ~SynchronousCompositorFactoryImpl();
31 31
32 // SynchronousCompositorFactory 32 // SynchronousCompositorFactory
33 virtual scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop() 33 virtual scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop()
34 OVERRIDE; 34 OVERRIDE;
35 virtual bool RecordFullLayer() OVERRIDE;
35 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(int routing_id) 36 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(int routing_id)
36 OVERRIDE; 37 OVERRIDE;
37 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() OVERRIDE; 38 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() OVERRIDE;
38 virtual scoped_refptr<webkit::gpu::ContextProviderWebContext> 39 virtual scoped_refptr<webkit::gpu::ContextProviderWebContext>
39 GetSharedOffscreenContextProviderForMainThread() OVERRIDE; 40 GetSharedOffscreenContextProviderForMainThread() OVERRIDE;
40 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( 41 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory(
41 int view_id) OVERRIDE; 42 int view_id) OVERRIDE;
42 virtual blink::WebGraphicsContext3D* CreateOffscreenGraphicsContext3D( 43 virtual blink::WebGraphicsContext3D* CreateOffscreenGraphicsContext3D(
43 const blink::WebGraphicsContext3D::Attributes& attributes) OVERRIDE; 44 const blink::WebGraphicsContext3D::Attributes& attributes) OVERRIDE;
44 45
45 46
46 SynchronousInputEventFilter* synchronous_input_event_filter() { 47 SynchronousInputEventFilter* synchronous_input_event_filter() {
47 return &synchronous_input_event_filter_; 48 return &synchronous_input_event_filter_;
48 } 49 }
49 50
50 void SetDeferredGpuService( 51 void SetDeferredGpuService(
51 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); 52 scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
53 void DisableRecordFullLayer();
52 void CompositorInitializedHardwareDraw(); 54 void CompositorInitializedHardwareDraw();
53 void CompositorReleasedHardwareDraw(); 55 void CompositorReleasedHardwareDraw();
54 56
55 scoped_refptr<cc::ContextProvider> 57 scoped_refptr<cc::ContextProvider>
56 CreateOnscreenContextProviderForCompositorThread(); 58 CreateOnscreenContextProviderForCompositorThread();
57 gpu::GLInProcessContext* GetShareContext(); 59 gpu::GLInProcessContext* GetShareContext();
58 60
59 private: 61 private:
60 bool CanCreateMainThreadContext(); 62 bool CanCreateMainThreadContext();
61 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> 63 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider>
62 TryCreateStreamTextureFactory(); 64 TryCreateStreamTextureFactory();
63 65
64 SynchronousInputEventFilter synchronous_input_event_filter_; 66 SynchronousInputEventFilter synchronous_input_event_filter_;
65 67
66 scoped_refptr<webkit::gpu::ContextProviderWebContext> 68 scoped_refptr<webkit::gpu::ContextProviderWebContext>
67 offscreen_context_for_main_thread_; 69 offscreen_context_for_main_thread_;
68 70
69 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; 71 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_;
70 scoped_ptr<gpu::GLInProcessContext> share_context_; 72 scoped_ptr<gpu::GLInProcessContext> share_context_;
71 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> 73 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider>
72 video_context_provider_; 74 video_context_provider_;
73 75
76 bool record_full_layer_;
77
74 // |num_hardware_compositor_lock_| is updated on UI thread only but can be 78 // |num_hardware_compositor_lock_| is updated on UI thread only but can be
75 // read on renderer main thread. 79 // read on renderer main thread.
76 base::Lock num_hardware_compositor_lock_; 80 base::Lock num_hardware_compositor_lock_;
77 unsigned int num_hardware_compositors_; 81 unsigned int num_hardware_compositors_;
78 }; 82 };
79 83
80 } // namespace content 84 } // namespace content
81 85
82 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP L_H_ 86 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP L_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('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