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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 23247002: Remove base::Callback from ContextProvider creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 779a1a4884900b00e59b2c9feff7cfe9a712d2c7..35fc832b772284d56bece0e4623bca1df0a0fc87 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -365,15 +365,6 @@ bool CompositorImpl::CopyTextureToBitmap(WebKit::WebGLId texture_id,
return true;
}
-static scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl>
-CreateInProcessViewContext(
- const WebKit::WebGraphicsContext3D::Attributes attributes,
- ANativeWindow* window) {
- using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl;
- return WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext(
- attributes, window).Pass();
-}
-
static scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
CreateGpuProcessViewContext(
const WebKit::WebGraphicsContext3D::Attributes attributes,
@@ -415,9 +406,12 @@ scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
attrs.noAutomaticFlushes = true;
if (g_use_direct_gl) {
+ using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl;
+ scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d =
+ WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext(
+ attrs, window_);
scoped_refptr<webkit::gpu::ContextProviderInProcess> context_provider =
- webkit::gpu::ContextProviderInProcess::Create(
- base::Bind(&CreateInProcessViewContext, attrs, window_));
+ webkit::gpu::ContextProviderInProcess::Create(context3d.Pass());
scoped_ptr<cc::OutputSurface> output_surface;
if (!window_)
@@ -431,11 +425,8 @@ scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
DCHECK(surface_id_);
scoped_refptr<ContextProviderCommandBuffer> context_provider =
- ContextProviderCommandBuffer::Create(
- base::Bind(&CreateGpuProcessViewContext,
- attrs,
- surface_id_,
- weak_factory_.GetWeakPtr()));
+ ContextProviderCommandBuffer::Create(CreateGpuProcessViewContext(
+ attrs, surface_id_, weak_factory_.GetWeakPtr()));
if (!context_provider.get()) {
LOG(ERROR) << "Failed to create 3D context for compositor.";
return scoped_ptr<cc::OutputSurface>();
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.cc ('k') | content/common/gpu/client/context_provider_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698