| Index: blimp/client/support/compositor/blimp_context_provider.cc
|
| diff --git a/blimp/client/support/compositor/blimp_context_provider.cc b/blimp/client/support/compositor/blimp_context_provider.cc
|
| index 373e4268500f280e56717e57703ab04178adf6a6..83874cbc18c56255429ecfc2a072bfc2dc5ebfff 100644
|
| --- a/blimp/client/support/compositor/blimp_context_provider.cc
|
| +++ b/blimp/client/support/compositor/blimp_context_provider.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/bind.h"
|
| #include "base/callback_helpers.h"
|
| #include "base/lazy_instance.h"
|
| +#include "cc/output/context_cache_controller.h"
|
| #include "gpu/command_buffer/client/gl_in_process_context.h"
|
| #include "gpu/command_buffer/client/gles2_implementation.h"
|
| #include "gpu/command_buffer/client/gles2_lib.h"
|
| @@ -48,6 +49,9 @@ BlimpContextProvider::BlimpContextProvider(
|
| gpu_memory_buffer_manager, nullptr /* memory_limits */));
|
| context_->GetImplementation()->SetLostContextCallback(
|
| base::Bind(&BlimpContextProvider::OnLostContext, base::Unretained(this)));
|
| +
|
| + cache_controller_.reset(
|
| + new cc::ContextCacheController(context_->GetImplementation()));
|
| }
|
|
|
| BlimpContextProvider::~BlimpContextProvider() {
|
| @@ -86,10 +90,15 @@ class GrContext* BlimpContextProvider::GrContext() {
|
| return gr_context_->get();
|
|
|
| gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
|
| -
|
| + cache_controller_->SetGrContext(gr_context_->get());
|
| return gr_context_->get();
|
| }
|
|
|
| +cc::ContextCacheController* BlimpContextProvider::CacheController() {
|
| + DCHECK(context_thread_checker_.CalledOnValidThread());
|
| + return cache_controller_.get();
|
| +}
|
| +
|
| void BlimpContextProvider::InvalidateGrContext(uint32_t state) {
|
| DCHECK(context_thread_checker_.CalledOnValidThread());
|
|
|
| @@ -103,13 +112,6 @@ base::Lock* BlimpContextProvider::GetLock() {
|
| return nullptr;
|
| }
|
|
|
| -void BlimpContextProvider::DeleteCachedResources() {
|
| - DCHECK(context_thread_checker_.CalledOnValidThread());
|
| -
|
| - if (gr_context_)
|
| - gr_context_->FreeGpuResources();
|
| -}
|
| -
|
| void BlimpContextProvider::SetLostContextCallback(
|
| const LostContextCallback& lost_context_callback) {
|
| DCHECK(context_thread_checker_.CalledOnValidThread());
|
|
|