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

Side by Side Diff: ui/compositor/test/in_process_context_factory.h

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Revert experiments and fix android_webview Created 4 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.h ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/surfaces/display.h" 12 #include "cc/surfaces/display.h"
13 #include "cc/test/test_gpu_memory_buffer_manager.h" 13 #include "cc/test/test_gpu_memory_buffer_manager.h"
14 #include "cc/test/test_image_factory.h" 14 #include "cc/test/test_image_factory.h"
15 #include "cc/test/test_shared_bitmap_manager.h" 15 #include "cc/test/test_shared_bitmap_manager.h"
16 #include "cc/test/test_task_graph_runner.h" 16 #include "cc/test/test_task_graph_runner.h"
17 #include "gpu/ipc/common/surface_handle.h"
17 #include "ui/compositor/compositor.h" 18 #include "ui/compositor/compositor.h"
18 19
19 namespace cc { 20 namespace cc {
20 class SurfaceManager; 21 class SurfaceManager;
21 } 22 }
22 23
23 namespace ui { 24 namespace ui {
24 class InProcessContextProvider; 25 class InProcessContextProvider;
25 26
26 class InProcessContextFactory : public ContextFactory { 27 class InProcessContextFactory : public ContextFactory {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, 66 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
66 base::TimeDelta interval) override {} 67 base::TimeDelta interval) override {}
67 void SetDisplayVSyncParameters(ui::Compositor* compositor, 68 void SetDisplayVSyncParameters(ui::Compositor* compositor,
68 base::TimeTicks timebase, 69 base::TimeTicks timebase,
69 base::TimeDelta interval) override {} 70 base::TimeDelta interval) override {}
70 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {} 71 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {}
71 void AddObserver(ContextFactoryObserver* observer) override; 72 void AddObserver(ContextFactoryObserver* observer) override;
72 void RemoveObserver(ContextFactoryObserver* observer) override; 73 void RemoveObserver(ContextFactoryObserver* observer) override;
73 74
74 private: 75 private:
76 struct PerCompositorData;
77
78 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor);
79
75 scoped_refptr<InProcessContextProvider> shared_main_thread_contexts_; 80 scoped_refptr<InProcessContextProvider> shared_main_thread_contexts_;
76 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_; 81 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_;
77 cc::TestSharedBitmapManager shared_bitmap_manager_; 82 cc::TestSharedBitmapManager shared_bitmap_manager_;
78 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; 83 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
79 cc::TestImageFactory image_factory_; 84 cc::TestImageFactory image_factory_;
80 cc::TestTaskGraphRunner task_graph_runner_; 85 cc::TestTaskGraphRunner task_graph_runner_;
81 uint32_t next_surface_client_id_; 86 uint32_t next_surface_client_id_;
82 bool use_test_surface_; 87 bool use_test_surface_;
83 bool context_factory_for_test_; 88 bool context_factory_for_test_;
84 cc::SurfaceManager* surface_manager_; 89 cc::SurfaceManager* surface_manager_;
85 base::ObserverList<ContextFactoryObserver> observer_list_; 90 base::ObserverList<ContextFactoryObserver> observer_list_;
86 91
87 base::hash_map<Compositor*, std::unique_ptr<cc::Display>> 92 using PerCompositorDataMap =
88 per_compositor_data_; 93 base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>;
94 PerCompositorDataMap per_compositor_data_;
89 95
90 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); 96 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
91 }; 97 };
92 98
93 } // namespace ui 99 } // namespace ui
94 100
95 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 101 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.h ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698