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

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

Issue 2083853002: exo: Recreate Surface resources on context lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browser test Created 4 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 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
(...skipping 23 matching lines...) Expand all
34 InProcessContextFactory(bool context_factory_for_test, 34 InProcessContextFactory(bool context_factory_for_test,
35 cc::SurfaceManager* surface_manager); 35 cc::SurfaceManager* surface_manager);
36 ~InProcessContextFactory() override; 36 ~InProcessContextFactory() override;
37 37
38 // If true (the default) an OutputSurface is created that does not display 38 // If true (the default) an OutputSurface is created that does not display
39 // anything. Set to false if you want to see results on the screen. 39 // anything. Set to false if you want to see results on the screen.
40 void set_use_test_surface(bool use_test_surface) { 40 void set_use_test_surface(bool use_test_surface) {
41 use_test_surface_ = use_test_surface; 41 use_test_surface_ = use_test_surface;
42 } 42 }
43 43
44 // This is used to call OnLostResources on all clients, to ensure they stop
45 // using the SharedMainThreadContextProvider.
46 void SendOnLostResources();
47
44 // ContextFactory implementation 48 // ContextFactory implementation
45 void CreateOutputSurface(base::WeakPtr<Compositor> compositor) override; 49 void CreateOutputSurface(base::WeakPtr<Compositor> compositor) override;
46 50
47 std::unique_ptr<Reflector> CreateReflector(Compositor* mirrored_compositor, 51 std::unique_ptr<Reflector> CreateReflector(Compositor* mirrored_compositor,
48 Layer* mirroring_layer) override; 52 Layer* mirroring_layer) override;
49 void RemoveReflector(Reflector* reflector) override; 53 void RemoveReflector(Reflector* reflector) override;
50 54
51 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; 55 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
52 void RemoveCompositor(Compositor* compositor) override; 56 void RemoveCompositor(Compositor* compositor) override;
53 bool DoesCreateTestContexts() override; 57 bool DoesCreateTestContexts() override;
(...skipping 24 matching lines...) Expand all
78 82
79 base::hash_map<Compositor*, std::unique_ptr<cc::Display>> 83 base::hash_map<Compositor*, std::unique_ptr<cc::Display>>
80 per_compositor_data_; 84 per_compositor_data_;
81 85
82 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); 86 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
83 }; 87 };
84 88
85 } // namespace ui 89 } // namespace ui
86 90
87 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ 91 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698