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

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

Issue 2554583002: Get rid of ImageTransportFactory::GetSurfaceManager (Closed)
Patch Set: Add missing include 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
« no previous file with comments | « no previous file | content/browser/compositor/surface_utils.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 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 cc {
20 class SurfaceManager;
21 }
22
23 namespace gfx { 19 namespace gfx {
24 enum class SwapResult; 20 enum class SwapResult;
25 } 21 }
26 22
27 namespace ui { 23 namespace ui {
28 class Compositor; 24 class Compositor;
29 class ContextFactory; 25 class ContextFactory;
30 } 26 }
31 27
32 namespace display_compositor { 28 namespace display_compositor {
(...skipping 24 matching lines...) Expand all
57 53
58 // Terminates the global transport factory. 54 // Terminates the global transport factory.
59 static void Terminate(); 55 static void Terminate();
60 56
61 // Gets the factory instance. 57 // Gets the factory instance.
62 static ImageTransportFactory* GetInstance(); 58 static ImageTransportFactory* GetInstance();
63 59
64 // Gets the image transport factory as a context factory for the compositor. 60 // Gets the image transport factory as a context factory for the compositor.
65 virtual ui::ContextFactory* GetContextFactory() = 0; 61 virtual ui::ContextFactory* GetContextFactory() = 0;
66 62
67 virtual cc::SurfaceManager* GetSurfaceManager() = 0;
68
69 // Gets a GLHelper instance, associated with the shared context. This 63 // Gets a GLHelper instance, associated with the shared context. This
70 // GLHelper will get destroyed whenever the shared context is lost 64 // GLHelper will get destroyed whenever the shared context is lost
71 // (ImageTransportFactoryObserver::OnLostResources is called). 65 // (ImageTransportFactoryObserver::OnLostResources is called).
72 virtual display_compositor::GLHelper* GetGLHelper() = 0; 66 virtual display_compositor::GLHelper* GetGLHelper() = 0;
73 67
74 virtual void SetGpuChannelEstablishFactory( 68 virtual void SetGpuChannelEstablishFactory(
75 gpu::GpuChannelEstablishFactory* factory) = 0; 69 gpu::GpuChannelEstablishFactory* factory) = 0;
76 70
77 #if defined(OS_MACOSX) 71 #if defined(OS_MACOSX)
78 // Called with |suspended| as true when the ui::Compositor has been 72 // Called with |suspended| as true when the ui::Compositor has been
79 // disconnected from an NSView and may be attached to another one. Called 73 // disconnected from an NSView and may be attached to another one. Called
80 // with |suspended| as false after the ui::Compositor has been connected to 74 // with |suspended| as false after the ui::Compositor has been connected to
81 // a new NSView and the first commit targeted at the new NSView has 75 // a new NSView and the first commit targeted at the new NSView has
82 // completed. This ensures that content and frames intended for the old 76 // completed. This ensures that content and frames intended for the old
83 // NSView will not flash in the new NSView. 77 // NSView will not flash in the new NSView.
84 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 78 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
85 bool suspended) = 0; 79 bool suspended) = 0;
86 #endif 80 #endif
87 }; 81 };
88 82
89 } // namespace content 83 } // namespace content
90 84
91 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 85 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/surface_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698