Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: content/renderer/webgraphicscontext3d_provider_impl.cc

Issue 1830033003: Make lost context callback a base::Closure thru the WGC3DProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lostcontext-webclosure: no-lambdas-sadface Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/webgraphicscontext3d_provider_impl.h" 5 #include "content/renderer/webgraphicscontext3d_provider_impl.h"
6 6
7 #include "cc/blink/context_provider_web_context.h" 7 #include "cc/blink/context_provider_web_context.h"
8 #include "third_party/WebKit/public/platform/callback/WebClosure.h"
8 9
9 namespace content { 10 namespace content {
10 11
11 WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl( 12 WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl(
12 scoped_refptr<cc_blink::ContextProviderWebContext> provider) 13 scoped_refptr<cc_blink::ContextProviderWebContext> provider)
13 : provider_(provider) { 14 : provider_(provider) {
14 } 15 }
15 16
16 WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {} 17 WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {}
17 18
18 blink::WebGraphicsContext3D* WebGraphicsContext3DProviderImpl::context3d() { 19 blink::WebGraphicsContext3D* WebGraphicsContext3DProviderImpl::context3d() {
19 return provider_->WebContext3D(); 20 return provider_->WebContext3D();
20 } 21 }
21 22
22 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { 23 gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() {
23 return provider_->ContextGL(); 24 return provider_->ContextGL();
24 } 25 }
25 26
26 GrContext* WebGraphicsContext3DProviderImpl::grContext() { 27 GrContext* WebGraphicsContext3DProviderImpl::grContext() {
27 return provider_->GrContext(); 28 return provider_->GrContext();
28 } 29 }
29 30
31 void WebGraphicsContext3DProviderImpl::setLostContextCallback(
32 blink::WebClosure c) {
33 provider_->SetLostContextCallback(c.ToBaseClosure());
34 }
35
30 } // namespace content 36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698