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

Side by Side Diff: mojo/services/view_manager/context_factory_impl.h

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_CONTEXT_FACTORY_IMPL_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_CONTEXT_FACTORY_IMPL_H_
7
8 #include "mojo/public/cpp/system/core.h"
9 #include "ui/compositor/compositor.h"
10
11 namespace webkit {
12 namespace gpu {
13 class ContextProviderInProcess;
14 }
15 }
16
17 namespace mojo {
18 namespace service {
19
20 // The default factory that creates in-process contexts.
21 class ContextFactoryImpl : public ui::ContextFactory {
22 public:
23 explicit ContextFactoryImpl(ScopedMessagePipeHandle command_buffer_handle);
24 virtual ~ContextFactoryImpl();
25
26 // ContextFactory implementation
27 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
28 ui::Compositor* compositor, bool software_fallback) OVERRIDE;
29
30 virtual scoped_refptr<ui::Reflector> CreateReflector(
31 ui::Compositor* compositor,
32 ui::Layer* layer) OVERRIDE;
33 virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) OVERRIDE;
34
35 virtual scoped_refptr<cc::ContextProvider>
36 SharedMainThreadContextProvider() OVERRIDE;
37 virtual void RemoveCompositor(ui::Compositor* compositor) OVERRIDE;
38 virtual bool DoesCreateTestContexts() OVERRIDE;
39 virtual cc::SharedBitmapManager* GetSharedBitmapManager() OVERRIDE;
40 virtual base::MessageLoopProxy* GetCompositorMessageLoop() OVERRIDE;
41
42 private:
43 scoped_refptr<webkit::gpu::ContextProviderInProcess>
44 shared_main_thread_contexts_;
45
46 ScopedMessagePipeHandle command_buffer_handle_;
47
48 // TODO(sky): for debugging, remove.
49 bool did_create_;
50
51 DISALLOW_COPY_AND_ASSIGN(ContextFactoryImpl);
52 };
53
54 } // namespace service
55 } // namespace mojo
56
57 #endif // MOJO_SERVICES_VIEW_MANAGER_CONTEXT_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/connection_manager.cc ('k') | mojo/services/view_manager/context_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698