| Index: cc/test/test_in_process_context_provider.cc
|
| diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
|
| index 2a129829215163c56802b596db1909639d6f02c1..9c024db4edf710450802ac7279417648ee2a6410 100644
|
| --- a/cc/test/test_in_process_context_provider.cc
|
| +++ b/cc/test/test_in_process_context_provider.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "cc/output/context_cache_controller.h"
|
| #include "cc/resources/platform_color.h"
|
| #include "gpu/GLES2/gl2extchromium.h"
|
| #include "gpu/command_buffer/client/gl_in_process_context.h"
|
| @@ -59,7 +60,9 @@ TestInProcessContextProvider::TestInProcessContextProvider(
|
| : context_(CreateTestInProcessContext(
|
| &gpu_memory_buffer_manager_,
|
| &image_factory_,
|
| - (shared_context ? shared_context->context_.get() : nullptr))) {}
|
| + (shared_context ? shared_context->context_.get() : nullptr))),
|
| + cache_controller_(
|
| + new ContextCacheController(context_->GetImplementation())) {}
|
|
|
| TestInProcessContextProvider::~TestInProcessContextProvider() {
|
| }
|
| @@ -81,9 +84,14 @@ class GrContext* TestInProcessContextProvider::GrContext() {
|
| return gr_context_->get();
|
|
|
| gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
|
| + cache_controller_->SetGrContext(gr_context_->get());
|
| return gr_context_->get();
|
| }
|
|
|
| +ContextCacheController* TestInProcessContextProvider::CacheController() {
|
| + return cache_controller_.get();
|
| +}
|
| +
|
| void TestInProcessContextProvider::InvalidateGrContext(uint32_t state) {
|
| if (gr_context_)
|
| gr_context_->ResetContext(state);
|
| @@ -109,11 +117,6 @@ gpu::Capabilities TestInProcessContextProvider::ContextCapabilities() {
|
| return capabilities;
|
| }
|
|
|
| -void TestInProcessContextProvider::DeleteCachedResources() {
|
| - if (gr_context_)
|
| - gr_context_->FreeGpuResources();
|
| -}
|
| -
|
| void TestInProcessContextProvider::SetLostContextCallback(
|
| const LostContextCallback& lost_context_callback) {}
|
|
|
|
|