12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved.
22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file.
42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "webkit/common/gpu/context_provider_in_process.h"
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
7d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include <set>
8d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
93551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)#include "base/bind.h"
10fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch#include "base/callback_helpers.h"
11d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include "base/strings/string_split.h"
12d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include "base/strings/stringprintf.h"
133551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)#include "cc/output/managed_memory_policy.h"
148bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)#include "gpu/command_buffer/client/gles2_implementation.h"
1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h"
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace webkit {
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace gpu {
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class ContextProviderInProcess::LostContextCallbackProxy
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback {
222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit LostContextCallbackProxy(ContextProviderInProcess* provider)
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      : provider_(provider) {
252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    provider_->context3d_->setContextLostCallback(this);
262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  }
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
287dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch  virtual ~LostContextCallbackProxy() {
297dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch    provider_->context3d_->setContextLostCallback(NULL);
307dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch  }
317dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch
322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual void onContextLost() {
33fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch    provider_->OnLostContext();
342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  }
352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  ContextProviderInProcess* provider_;
382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
403551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// static
413551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)scoped_refptr<ContextProviderInProcess> ContextProviderInProcess::Create(
42d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d,
43d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    const std::string& debug_name) {
443551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  if (!context3d)
453551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)    return NULL;
46d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  return new ContextProviderInProcess(context3d.Pass(), debug_name);
472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
493551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)// static
503551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)scoped_refptr<ContextProviderInProcess>
513551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)ContextProviderInProcess::CreateOffscreen() {
52f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  blink::WebGraphicsContext3D::Attributes attributes;
532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  attributes.depth = false;
542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  attributes.stencil = true;
552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  attributes.antialias = false;
562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  attributes.shareResources = true;
572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  attributes.noAutomaticFlushes = true;
582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
593551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  return Create(
60c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
61d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)          attributes), "Offscreen");
623551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)}
633551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
643551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)ContextProviderInProcess::ContextProviderInProcess(
65d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d,
66d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    const std::string& debug_name)
673551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)    : context3d_(context3d.Pass()),
68d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      destroyed_(false),
69d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      debug_name_(debug_name) {
703551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  DCHECK(main_thread_checker_.CalledOnValidThread());
713551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  DCHECK(context3d_);
723551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  context_thread_checker_.DetachFromThread();
733551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)}
742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
753551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)ContextProviderInProcess::~ContextProviderInProcess() {
763551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  DCHECK(main_thread_checker_.CalledOnValidThread() ||
773551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)         context_thread_checker_.CalledOnValidThread());
782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)bool ContextProviderInProcess::BindToCurrentThread() {
812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DCHECK(context3d_);
822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
83fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  // This is called on the thread the context will be used.
84fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
85fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch
862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  if (lost_context_callback_proxy_)
872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    return true;
882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  if (!context3d_->makeContextCurrent())
902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    return false;
912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
92a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  InitializeCapabilities();
93a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
94d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  std::string unique_context_name =
95d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      base::StringPrintf("%s-%p", debug_name_.c_str(), context3d_.get());
96d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  context3d_->pushGroupMarkerEXT(unique_context_name.c_str());
97d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this));
992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  return true;
1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
102a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)void ContextProviderInProcess::InitializeCapabilities() {
103a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  capabilities_ = Capabilities(context3d_->GetImplementation()->capabilities());
104a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)}
105a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
106424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)cc::ContextProvider::Capabilities
107424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)ContextProviderInProcess::ContextCapabilities() {
108a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
109a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(context_thread_checker_.CalledOnValidThread());
110a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  return capabilities_;
111424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)}
112424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
113f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)blink::WebGraphicsContext3D* ContextProviderInProcess::Context3d() {
1142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
115fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
1162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  return context3d_.get();
1182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
120a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)::gpu::gles2::GLES2Interface* ContextProviderInProcess::ContextGL() {
1218bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  DCHECK(context3d_);
1228bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
1238bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  DCHECK(context_thread_checker_.CalledOnValidThread());
1248bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)
125a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  return context3d_->GetGLInterface();
126a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)}
127a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
128a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)::gpu::ContextSupport* ContextProviderInProcess::ContextSupport() {
129a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(context3d_);
130a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  if (!lost_context_callback_proxy_)
131a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)    return NULL;  // Not bound to anything.
132a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
133a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(context_thread_checker_.CalledOnValidThread());
134a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
1358bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)  return context3d_->GetContextSupport();
1368bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)}
1378bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)
1382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class GrContext* ContextProviderInProcess::GrContext() {
1392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
140fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
1412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  if (gr_context_)
1432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    return gr_context_->get();
1442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  gr_context_.reset(
1462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      new webkit::gpu::GrContextForWebGraphicsContext3D(context3d_.get()));
1472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  return gr_context_->get();
1482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
150a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)void ContextProviderInProcess::MakeGrContextCurrent() {
151a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
152a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(context_thread_checker_.CalledOnValidThread());
153a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  DCHECK(gr_context_);
154a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
155a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  context3d_->makeContextCurrent();
156a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)}
157a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
158f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)bool ContextProviderInProcess::IsContextLost() {
159f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
160f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  DCHECK(context_thread_checker_.CalledOnValidThread());
161f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
162f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return context3d_->isContextLost();
163f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
164f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
1652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)void ContextProviderInProcess::VerifyContexts() {
1662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DCHECK(lost_context_callback_proxy_);  // Is bound to thread.
167fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
1682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  if (context3d_->isContextLost())
170fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch    OnLostContext();
1712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
173fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdochvoid ContextProviderInProcess::OnLostContext() {
174fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
1752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  {
1762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    base::AutoLock lock(destroyed_lock_);
1772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    if (destroyed_)
1782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      return;
1792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    destroyed_ = true;
1802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  }
181fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  if (!lost_context_callback_.is_null())
182fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch    base::ResetAndReturn(&lost_context_callback_).Run();
1832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)bool ContextProviderInProcess::DestroyedOnMainThread() {
186fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(main_thread_checker_.CalledOnValidThread());
187fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch
1882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  base::AutoLock lock(destroyed_lock_);
1892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  return destroyed_;
1902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
192fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdochvoid ContextProviderInProcess::SetLostContextCallback(
193fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch    const LostContextCallback& lost_context_callback) {
194fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  DCHECK(context_thread_checker_.CalledOnValidThread());
1953551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  DCHECK(lost_context_callback_.is_null() ||
1963551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)         lost_context_callback.is_null());
197fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch  lost_context_callback_ = lost_context_callback;
198fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch}
199fb250657ef40d7500f20882d5c9909c1013367d3Ben Murdoch
2003551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
2013551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)    const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
2021e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  // There's no memory manager for the in-process implementation.
2032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
2042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}  // namespace gpu
2062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}  // namespace webkit
207