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

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

Issue 888783002: Composite to cc::Display from ui::InProcessContextFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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 "cc/test/test_gpu_memory_buffer_manager.h" 8 #include "cc/test/test_gpu_memory_buffer_manager.h"
9 #include "cc/test/test_shared_bitmap_manager.h" 9 #include "cc/test/test_shared_bitmap_manager.h"
10 #include "ui/compositor/compositor.h" 10 #include "ui/compositor/compositor.h"
11 11
12 namespace base { 12 namespace base {
13 class Thread; 13 class Thread;
14 } 14 }
15 15
16 namespace cc {
17 class OnscreenDisplayClient;
18 class SurfaceManager;
19 }
20
16 namespace ui { 21 namespace ui {
17 22
18 class InProcessContextFactory : public ContextFactory { 23 class InProcessContextFactory : public ContextFactory {
19 public: 24 public:
20 explicit InProcessContextFactory(bool context_factory_for_test); 25 InProcessContextFactory(bool context_factory_for_test,
26 cc::SurfaceManager* surface_manager);
sky 2015/02/03 00:44:58 nit: document ownership.
jbauman 2015/02/03 01:47:21 Done.
21 ~InProcessContextFactory() override; 27 ~InProcessContextFactory() override;
22 28
23 // If true (the default) an OutputSurface is created that does not display 29 // If true (the default) an OutputSurface is created that does not display
24 // anything. Set to false if you want to see results on the screen. 30 // anything. Set to false if you want to see results on the screen.
25 void set_use_test_surface(bool use_test_surface) { 31 void set_use_test_surface(bool use_test_surface) {
26 use_test_surface_ = use_test_surface; 32 use_test_surface_ = use_test_surface;
27 } 33 }
28 34
29 // ContextFactory implementation 35 // ContextFactory implementation
30 void CreateOutputSurface(base::WeakPtr<Compositor> compositor, 36 void CreateOutputSurface(base::WeakPtr<Compositor> compositor,
(...skipping 13 matching lines...) Expand all
44 void ResizeDisplay(ui::Compositor* compositor, 50 void ResizeDisplay(ui::Compositor* compositor,
45 const gfx::Size& size) override; 51 const gfx::Size& size) override;
46 52
47 private: 53 private:
48 scoped_ptr<base::Thread> compositor_thread_; 54 scoped_ptr<base::Thread> compositor_thread_;
49 scoped_refptr<cc::ContextProvider> shared_main_thread_contexts_; 55 scoped_refptr<cc::ContextProvider> shared_main_thread_contexts_;
50 cc::TestSharedBitmapManager shared_bitmap_manager_; 56 cc::TestSharedBitmapManager shared_bitmap_manager_;
51 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; 57 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
52 uint32_t next_surface_id_namespace_; 58 uint32_t next_surface_id_namespace_;
53 bool use_test_surface_; 59 bool use_test_surface_;
60 bool context_factory_for_test_;
61 cc::SurfaceManager* surface_manager_;
54 62
55 const bool context_factory_for_test_; 63 base::hash_map<Compositor*, cc::OnscreenDisplayClient*> per_compositor_data_;
56 64
57 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); 65 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
58 }; 66 };
59 67
60 } // namespace ui 68 } // namespace ui
61 69
62 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 70 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698