Chromium Code Reviews| 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..360f4d3c8c821239db7d0318dde13a7303e7aba7 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,8 @@ ContextProvider::ContextProvider( |
| bool ContextProvider::BindToCurrentThread() { |
| context_ = GLES2Context::CreateOffscreenContext(gpu_channel_host_); |
| + cache_controller_.reset( |
| + new cc::ContextCacheController(context_->context_support())); |
| return !!context_; |
|
danakj
2016/08/26 23:49:09
This suggests context_ can be null. Either your co
ericrk
2016/08/29 22:43:23
Yeah, it can be null, good point.
|
| } |
| @@ -35,6 +38,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() { |