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

Side by Side Diff: cc/context_provider.h

Issue 12212100: Provide shared context to Platform API in renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseforreals Created 7 years, 9 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 | « no previous file | cc/test/fake_context_provider.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 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 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 CC_CONTEXT_PROVIDER_H_ 5 #ifndef CC_CONTEXT_PROVIDER_H_
6 #define CC_CONTEXT_PROVIDER_H_ 6 #define CC_CONTEXT_PROVIDER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 class GrContext; 10 class GrContext;
(...skipping 14 matching lines...) Expand all
25 virtual bool BindToCurrentThread() = 0; 25 virtual bool BindToCurrentThread() = 0;
26 26
27 virtual WebKit::WebGraphicsContext3D* Context3d() = 0; 27 virtual WebKit::WebGraphicsContext3D* Context3d() = 0;
28 virtual class GrContext* GrContext() = 0; 28 virtual class GrContext* GrContext() = 0;
29 29
30 // Ask the provider to check if the contexts are valid or lost. If they are, 30 // Ask the provider to check if the contexts are valid or lost. If they are,
31 // this should invalidate the provider so that it can be replaced with a new 31 // this should invalidate the provider so that it can be replaced with a new
32 // one. 32 // one.
33 virtual void VerifyContexts() = 0; 33 virtual void VerifyContexts() = 0;
34 34
35 // A method to be called from the main thread that should return true if
36 // the context inside the provider is no longer valid.
37 virtual bool DestroyedOnMainThread() = 0;
38
35 protected: 39 protected:
36 friend class base::RefCountedThreadSafe<ContextProvider>; 40 friend class base::RefCountedThreadSafe<ContextProvider>;
37 virtual ~ContextProvider() {} 41 virtual ~ContextProvider() {}
38 }; 42 };
39 43
40 } // namespace cc 44 } // namespace cc
41 45
42 #endif // CC_CONTEXT_PROVIDER_H_ 46 #endif // CC_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/fake_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698