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

Side by Side Diff: components/mus/public/cpp/context_provider.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « components/mus/public/cpp/DEPS ('k') | components/mus/public/cpp/gles2_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "cc/output/context_provider.h"
14 #include "components/mus/public/interfaces/command_buffer.mojom.h"
15 #include "mojo/public/cpp/system/core.h"
16
17 namespace shell {
18 class Connector;
19 }
20
21 namespace mus {
22
23 class GLES2Context;
24
25 class ContextProvider : public cc::ContextProvider {
26 public:
27 explicit ContextProvider(shell::Connector* connector);
28
29 // cc::ContextProvider implementation.
30 bool BindToCurrentThread() override;
31 gpu::gles2::GLES2Interface* ContextGL() override;
32 gpu::ContextSupport* ContextSupport() override;
33 class GrContext* GrContext() override;
34 void InvalidateGrContext(uint32_t state) override;
35 base::Lock* GetLock() override;
36 gpu::Capabilities ContextCapabilities() override;
37 void DeleteCachedResources() override {}
38 void SetLostContextCallback(
39 const LostContextCallback& lost_context_callback) override {}
40
41 protected:
42 friend class base::RefCountedThreadSafe<ContextProvider>;
43 ~ContextProvider() override;
44
45 private:
46 std::unique_ptr<shell::Connector> connector_;
47 std::unique_ptr<GLES2Context> context_;
48
49 DISALLOW_COPY_AND_ASSIGN(ContextProvider);
50 };
51
52 } // namespace mus
53
54 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/DEPS ('k') | components/mus/public/cpp/gles2_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698