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

Side by Side Diff: ui/compositor/context_provider_from_context_factory.h

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: clang-format Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/context_provider_from_context_factory.cc » ('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 (c) 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 UI_COMPOSITOR_CONTEXT_PROVIDER_FROM_CONTEXT_FACTORY_H_
6 #define UI_COMPOSITOR_CONTEXT_PROVIDER_FROM_CONTEXT_FACTORY_H_
7
8 #include "base/synchronization/lock.h"
9 #include "cc/output/context_provider.h"
10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
11 #include "ui/compositor/compositor.h"
12 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h"
13
14 namespace ui {
15
16 class ContextProviderFromContextFactory
17 : public cc::ContextProvider {
18 public:
19 static scoped_refptr<ContextProviderFromContextFactory> CreateForOffscreen(
20 ContextFactory* factory);
21
22 virtual bool BindToCurrentThread() OVERRIDE;
23 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
24 virtual class GrContext* GrContext() OVERRIDE;
25 virtual void VerifyContexts() OVERRIDE;
26 virtual bool DestroyedOnMainThread() OVERRIDE;
27 virtual void SetLostContextCallback(const LostContextCallback& cb) OVERRIDE;
28
29 protected:
30 ContextProviderFromContextFactory(ContextFactory* factory);
31 virtual ~ContextProviderFromContextFactory();
32
33 bool InitializeOnMainThread();
34
35 private:
36 ContextFactory* factory_;
37 base::Lock destroyed_lock_;
38 bool destroyed_;
39 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
40 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
41 };
42
43 } // namespace ui
44
45 #endif // UI_COMPOSITOR_CONTEXT_PROVIDER_FROM_CONTEXT_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/context_provider_from_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698