| Index: ui/compositor/test/in_process_context_provider.cc
|
| diff --git a/ui/compositor/test/in_process_context_provider.cc b/ui/compositor/test/in_process_context_provider.cc
|
| index 1e6bc30150e09a43d7ea0d77b66676319def858d..ba3dde4fb1f03a36b074770ea8189b1daf695032 100644
|
| --- a/ui/compositor/test/in_process_context_provider.cc
|
| +++ b/ui/compositor/test/in_process_context_provider.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/macros.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/trace_event/trace_event.h"
|
| +#include "cc/output/context_cache_controller.h"
|
| #include "cc/output/managed_memory_policy.h"
|
| #include "gpu/command_buffer/client/gl_in_process_context.h"
|
| #include "gpu/command_buffer/client/gles2_implementation.h"
|
| @@ -93,6 +94,9 @@ bool InProcessContextProvider::BindToCurrentThread() {
|
|
|
| if (!context_)
|
| return false;
|
| +
|
| + cache_controller_.reset(
|
| + new cc::ContextCacheController(context_->GetImplementation()));
|
| }
|
|
|
| std::string unique_context_name =
|
| @@ -131,10 +135,16 @@ class GrContext* InProcessContextProvider::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* InProcessContextProvider::CacheController() {
|
| + DCHECK(context_thread_checker_.CalledOnValidThread());
|
| + return cache_controller_.get();
|
| +}
|
| +
|
| void InProcessContextProvider::InvalidateGrContext(uint32_t state) {
|
| DCHECK(context_thread_checker_.CalledOnValidThread());
|
|
|
| @@ -146,13 +156,6 @@ base::Lock* InProcessContextProvider::GetLock() {
|
| return &context_lock_;
|
| }
|
|
|
| -void InProcessContextProvider::DeleteCachedResources() {
|
| - DCHECK(context_thread_checker_.CalledOnValidThread());
|
| -
|
| - if (gr_context_)
|
| - gr_context_->FreeGpuResources();
|
| -}
|
| -
|
| void InProcessContextProvider::SetLostContextCallback(
|
| const LostContextCallback& lost_context_callback) {
|
| // Pixel tests do not test lost context.
|
|
|