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

Side by Side Diff: content/browser/compositor/image_transport_factory.h

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years 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 CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "cc/surfaces/surface_id_allocator.h" 13 #include "cc/surfaces/surface_id_allocator.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "gpu/ipc/common/surface_handle.h" 15 #include "gpu/ipc/common/surface_handle.h"
16 #include "ui/events/latency_info.h" 16 #include "ui/events/latency_info.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 18
19 namespace gfx { 19 namespace gfx {
20 enum class SwapResult; 20 enum class SwapResult;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class Compositor; 24 class Compositor;
25 class ContextFactory; 25 class ContextFactory;
26 class ContextFactoryPrivate;
26 } 27 }
27 28
28 namespace display_compositor { 29 namespace display_compositor {
29 class GLHelper; 30 class GLHelper;
30 } 31 }
31 32
32 namespace gpu { 33 namespace gpu {
33 class GpuChannelEstablishFactory; 34 class GpuChannelEstablishFactory;
34 } 35 }
35 36
(...skipping 17 matching lines...) Expand all
53 54
54 // Terminates the global transport factory. 55 // Terminates the global transport factory.
55 static void Terminate(); 56 static void Terminate();
56 57
57 // Gets the factory instance. 58 // Gets the factory instance.
58 static ImageTransportFactory* GetInstance(); 59 static ImageTransportFactory* GetInstance();
59 60
60 // Gets the image transport factory as a context factory for the compositor. 61 // Gets the image transport factory as a context factory for the compositor.
61 virtual ui::ContextFactory* GetContextFactory() = 0; 62 virtual ui::ContextFactory* GetContextFactory() = 0;
62 63
64 // Gets the image transport factory as the privileged context factory for the
65 // compositor. TODO(fsamuel): This interface should eventually go away once
66 // Mus subsumes this functionality.
67 virtual ui::ContextFactoryPrivate* GetContextFactoryPrivate() = 0;
68
63 // Gets a GLHelper instance, associated with the shared context. This 69 // Gets a GLHelper instance, associated with the shared context. This
64 // GLHelper will get destroyed whenever the shared context is lost 70 // GLHelper will get destroyed whenever the shared context is lost
65 // (ImageTransportFactoryObserver::OnLostResources is called). 71 // (ImageTransportFactoryObserver::OnLostResources is called).
66 virtual display_compositor::GLHelper* GetGLHelper() = 0; 72 virtual display_compositor::GLHelper* GetGLHelper() = 0;
67 73
68 virtual void SetGpuChannelEstablishFactory( 74 virtual void SetGpuChannelEstablishFactory(
69 gpu::GpuChannelEstablishFactory* factory) = 0; 75 gpu::GpuChannelEstablishFactory* factory) = 0;
70 76
71 #if defined(OS_MACOSX) 77 #if defined(OS_MACOSX)
72 // Called with |suspended| as true when the ui::Compositor has been 78 // Called with |suspended| as true when the ui::Compositor has been
73 // disconnected from an NSView and may be attached to another one. Called 79 // disconnected from an NSView and may be attached to another one. Called
74 // with |suspended| as false after the ui::Compositor has been connected to 80 // with |suspended| as false after the ui::Compositor has been connected to
75 // a new NSView and the first commit targeted at the new NSView has 81 // a new NSView and the first commit targeted at the new NSView has
76 // completed. This ensures that content and frames intended for the old 82 // completed. This ensures that content and frames intended for the old
77 // NSView will not flash in the new NSView. 83 // NSView will not flash in the new NSView.
78 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 84 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
79 bool suspended) = 0; 85 bool suspended) = 0;
80 #endif 86 #endif
81 }; 87 };
82 88
83 } // namespace content 89 } // namespace content
84 90
85 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 91 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698