| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 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 | 44 // This is used to call OnLostResources on all clients, to ensure they stop |
| 45 // using the SharedMainThreadContextProvider. | 45 // using the SharedMainThreadContextProvider. |
| 46 void SendOnLostResources(); | 46 void SendOnLostResources(); |
| 47 | 47 |
| 48 // ContextFactory implementation | 48 // ContextFactory implementation |
| 49 void CreateOutputSurface(base::WeakPtr<Compositor> compositor) override; | 49 void CreateCompositorFrameSink(base::WeakPtr<Compositor> compositor) override; |
| 50 | 50 |
| 51 std::unique_ptr<Reflector> CreateReflector(Compositor* mirrored_compositor, | 51 std::unique_ptr<Reflector> CreateReflector(Compositor* mirrored_compositor, |
| 52 Layer* mirroring_layer) override; | 52 Layer* mirroring_layer) override; |
| 53 void RemoveReflector(Reflector* reflector) override; | 53 void RemoveReflector(Reflector* reflector) override; |
| 54 | 54 |
| 55 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; | 55 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; |
| 56 void RemoveCompositor(Compositor* compositor) override; | 56 void RemoveCompositor(Compositor* compositor) override; |
| 57 bool DoesCreateTestContexts() override; | 57 bool DoesCreateTestContexts() override; |
| 58 uint32_t GetImageTextureTarget(gfx::BufferFormat format, | 58 uint32_t GetImageTextureTarget(gfx::BufferFormat format, |
| 59 gfx::BufferUsage usage) override; | 59 gfx::BufferUsage usage) override; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 base::hash_map<Compositor*, std::unique_ptr<cc::Display>> | 92 base::hash_map<Compositor*, std::unique_ptr<cc::Display>> |
| 93 per_compositor_data_; | 93 per_compositor_data_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | 95 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace ui | 98 } // namespace ui |
| 99 | 99 |
| 100 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 100 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
| OLD | NEW |