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

Unified Diff: cc/output/context_provider.h

Issue 2752833002: cc: Use gpu raster in HUD. (Closed)
Patch Set: create new surface for each tex Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/output/context_provider.h
diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
index 44c69412d3ba901268b3a60c96203e2c5755a0e7..c993a1172d7264bdc32dcb85bad0784e67705dec 100644
--- a/cc/output/context_provider.h
+++ b/cc/output/context_provider.h
@@ -50,6 +50,19 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
std::unique_ptr<ContextCacheController::ScopedBusy> busy_;
};
+ class CC_EXPORT ScopedContext {
danakj 2017/05/01 22:57:33 I don't think this class is doing more than if you
sohan 2017/05/03 11:06:35 Done.
+ public:
+ explicit ScopedContext(ContextProvider* context_provider);
+ ~ScopedContext();
+
+ gpu::gles2::GLES2Interface* ContextGL() {
+ return context_provider_->ContextGL();
+ }
+
+ private:
+ ContextProvider* const context_provider_;
+ std::unique_ptr<ContextCacheController::ScopedBusy> busy_;
+ };
// Bind the 3d context to the current thread. This should be called before
// accessing the contexts. Calling it more than once should have no effect.
// Once this function has been called, the class should only be accessed

Powered by Google App Engine
This is Rietveld 408576698