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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the GrContextProvider::ScopedContexts guard classes Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 false, 334 false,
335 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)) { 335 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)) {
336 LOG(ERROR) << "Failed to create 3D context for compositor."; 336 LOG(ERROR) << "Failed to create 3D context for compositor.";
337 return scoped_ptr<cc::OutputSurface>(); 337 return scoped_ptr<cc::OutputSurface>();
338 } 338 }
339 return scoped_ptr<cc::OutputSurface>( 339 return scoped_ptr<cc::OutputSurface>(
340 new WebGraphicsContextToOutputSurfaceAdapter(context.release())); 340 new WebGraphicsContextToOutputSurfaceAdapter(context.release()));
341 } 341 }
342 } 342 }
343 343
344 WebKit::WebGraphicsContext3D*
345 CompositorImpl::OffscreenContext3dForMainThread() {
346 // TODO(danakj): Get a context through ImageTransportSurfaceAndroid.
347 return NULL;
348 }
349
350 WebKit::WebGraphicsContext3D*
351 CompositorImpl::OffscreenContext3dForCompositorThread() {
352 // TODO(danakj): Get a context through ImageTransportSurfaceAndroid.
353 return NULL;
354 }
355
356 GrContext* CompositorImpl::OffscreenGrContextForMainThread() {
357 // TODO(danakj): Get a context through ImageTransportSurfaceAndroid.
358 return NULL;
359 }
360
361 GrContext* CompositorImpl::OffscreenGrContextForCompositorThread() {
362 // TODO(danakj): Get a context through ImageTransportSurfaceAndroid.
363 return NULL;
364 }
365
366 void CompositorImpl::DestroyOffscreenContext3dForCompositorThread() {
367 // TODO(danakj): Destroy the context through ImageTransportSurfaceAndroid.
368 }
369
344 scoped_ptr<cc::InputHandler> CompositorImpl::createInputHandler() { 370 scoped_ptr<cc::InputHandler> CompositorImpl::createInputHandler() {
345 return scoped_ptr<cc::InputHandler>(); 371 return scoped_ptr<cc::InputHandler>();
346 } 372 }
347 373
348 void CompositorImpl::didRecreateOutputSurface(bool success) { 374 void CompositorImpl::didRecreateOutputSurface(bool success) {
349 } 375 }
350 376
351 void CompositorImpl::didCommit() { 377 void CompositorImpl::didCommit() {
352 } 378 }
353 379
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 case ANDROID_BITMAP_FORMAT_RGBA_8888: 451 case ANDROID_BITMAP_FORMAT_RGBA_8888:
426 return GL_UNSIGNED_BYTE; 452 return GL_UNSIGNED_BYTE;
427 break; 453 break;
428 case ANDROID_BITMAP_FORMAT_RGB_565: 454 case ANDROID_BITMAP_FORMAT_RGB_565:
429 default: 455 default:
430 return GL_UNSIGNED_SHORT_5_6_5; 456 return GL_UNSIGNED_SHORT_5_6_5;
431 } 457 }
432 } 458 }
433 459
434 } // namespace content 460 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698