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

Unified Diff: services/ui/public/cpp/context_provider.cc

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: more fixes Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/public/cpp/context_provider.h ('k') | services/ui/surfaces/surfaces_context_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/context_provider.cc
diff --git a/services/ui/public/cpp/context_provider.cc b/services/ui/public/cpp/context_provider.cc
index 93610423f9cd0f5d08b293197276dec8a8ee8d14..55b16d2574fa3a49f4bfb2626b22f2d463968773 100644
--- a/services/ui/public/cpp/context_provider.cc
+++ b/services/ui/public/cpp/context_provider.cc
@@ -7,6 +7,7 @@
#include <stdint.h>
#include "base/logging.h"
+#include "cc/output/context_cache_controller.h"
#include "gpu/ipc/client/gpu_channel_host.h"
#include "services/ui/public/cpp/gles2_context.h"
@@ -18,6 +19,10 @@ ContextProvider::ContextProvider(
bool ContextProvider::BindToCurrentThread() {
context_ = GLES2Context::CreateOffscreenContext(gpu_channel_host_);
+ if (context_) {
+ cache_controller_.reset(
+ new cc::ContextCacheController(context_->context_support()));
+ }
return !!context_;
}
@@ -35,6 +40,10 @@ class GrContext* ContextProvider::GrContext() {
return NULL;
}
+cc::ContextCacheController* ContextProvider::CacheController() {
+ return cache_controller_.get();
+}
+
void ContextProvider::InvalidateGrContext(uint32_t state) {}
gpu::Capabilities ContextProvider::ContextCapabilities() {
« no previous file with comments | « services/ui/public/cpp/context_provider.h ('k') | services/ui/surfaces/surfaces_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698