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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_output_surface.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/aura/gpu_process_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/android/in_process/synchronous_compositor_output_surfa ce.h" 5 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/output/begin_frame_args.h" 9 #include "cc/output/begin_frame_args.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool SynchronousCompositorOutputSurface::InitializeHwDraw( 196 bool SynchronousCompositorOutputSurface::InitializeHwDraw(
197 scoped_refptr<gfx::GLSurface> surface, 197 scoped_refptr<gfx::GLSurface> surface,
198 scoped_refptr<cc::ContextProvider> offscreen_context_provider) { 198 scoped_refptr<cc::ContextProvider> offscreen_context_provider) {
199 DCHECK(CalledOnValidThread()); 199 DCHECK(CalledOnValidThread());
200 DCHECK(HasClient()); 200 DCHECK(HasClient());
201 DCHECK(!context_provider_); 201 DCHECK(!context_provider_);
202 DCHECK(surface); 202 DCHECK(surface);
203 203
204 scoped_refptr<cc::ContextProvider> onscreen_context_provider = 204 scoped_refptr<cc::ContextProvider> onscreen_context_provider =
205 webkit::gpu::ContextProviderInProcess::Create( 205 webkit::gpu::ContextProviderInProcess::Create(
206 base::Bind(&CreateWebGraphicsContext3D, surface)); 206 CreateWebGraphicsContext3D(surface));
207 return InitializeAndSetContext3d(onscreen_context_provider, 207 return InitializeAndSetContext3d(onscreen_context_provider,
208 offscreen_context_provider); 208 offscreen_context_provider);
209 } 209 }
210 210
211 void SynchronousCompositorOutputSurface::ReleaseHwDraw() { 211 void SynchronousCompositorOutputSurface::ReleaseHwDraw() {
212 cc::OutputSurface::ReleaseGL(); 212 cc::OutputSurface::ReleaseGL();
213 } 213 }
214 214
215 bool SynchronousCompositorOutputSurface::DemandDrawHw( 215 bool SynchronousCompositorOutputSurface::DemandDrawHw(
216 gfx::Size surface_size, 216 gfx::Size surface_size,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 279 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
280 return BrowserThread::CurrentlyOn(BrowserThread::UI); 280 return BrowserThread::CurrentlyOn(BrowserThread::UI);
281 } 281 }
282 282
283 SynchronousCompositorOutputSurfaceDelegate* 283 SynchronousCompositorOutputSurfaceDelegate*
284 SynchronousCompositorOutputSurface::GetDelegate() { 284 SynchronousCompositorOutputSurface::GetDelegate() {
285 return SynchronousCompositorImpl::FromRoutingID(routing_id_); 285 return SynchronousCompositorImpl::FromRoutingID(routing_id_);
286 } 286 }
287 287
288 } // namespace content 288 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/aura/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698