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

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: Restart with GrContext owned in cc 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 10 matching lines...) Expand all
21 #include "content/browser/gpu/gpu_surface_tracker.h" 21 #include "content/browser/gpu/gpu_surface_tracker.h"
22 #include "content/browser/renderer_host/image_transport_factory_android.h" 22 #include "content/browser/renderer_host/image_transport_factory_android.h"
23 #include "content/common/gpu/client/gl_helper.h" 23 #include "content/common/gpu/client/gl_helper.h"
24 #include "content/common/gpu/client/gpu_channel_host.h" 24 #include "content/common/gpu/client/gpu_channel_host.h"
25 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 25 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
26 #include "content/common/gpu/gpu_process_launch_causes.h" 26 #include "content/common/gpu/gpu_process_launch_causes.h"
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "third_party/khronos/GLES2/gl2.h" 28 #include "third_party/khronos/GLES2/gl2.h"
29 #include "third_party/khronos/GLES2/gl2ext.h" 29 #include "third_party/khronos/GLES2/gl2ext.h"
30 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 30 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
31 #include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsCo ntext3D.h"
31 #include "ui/gfx/android/java_bitmap.h" 32 #include "ui/gfx/android/java_bitmap.h"
32 #include "webkit/glue/webthread_impl.h" 33 #include "webkit/glue/webthread_impl.h"
33 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 34 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
34 35
35 namespace gfx { 36 namespace gfx {
36 class JavaBitmap; 37 class JavaBitmap;
37 } 38 }
38 39
39 namespace { 40 namespace {
40 41
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 false, 334 false,
334 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)) { 335 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)) {
335 LOG(ERROR) << "Failed to create 3D context for compositor."; 336 LOG(ERROR) << "Failed to create 3D context for compositor.";
336 return scoped_ptr<cc::OutputSurface>(); 337 return scoped_ptr<cc::OutputSurface>();
337 } 338 }
338 return scoped_ptr<cc::OutputSurface>( 339 return scoped_ptr<cc::OutputSurface>(
339 new WebGraphicsContextToOutputSurfaceAdapter(context.release())); 340 new WebGraphicsContextToOutputSurfaceAdapter(context.release()));
340 } 341 }
341 } 342 }
342 343
344 WebKit::WebGraphicsContext3D* CompositorImpl::
345 OffscreenContext3dForMainThread() {
346 // TODO(danakj): Create a context through ImageTransportSurfaceAndroid.
347 return NULL;
348 }
349
350 WebKit::WebGraphicsContext3D* CompositorImpl::
351 OffscreenContext3dForCompositorThread() {
352 // TODO(danakj): Create a context through ImageTransportSurfaceAndroid.
353 return NULL;
354 }
355
343 scoped_ptr<cc::InputHandler> CompositorImpl::createInputHandler() { 356 scoped_ptr<cc::InputHandler> CompositorImpl::createInputHandler() {
344 return scoped_ptr<cc::InputHandler>(); 357 return scoped_ptr<cc::InputHandler>();
345 } 358 }
346 359
347 void CompositorImpl::didRecreateOutputSurface(bool success) { 360 void CompositorImpl::didRecreateOutputSurface(bool success) {
348 } 361 }
349 362
350 void CompositorImpl::didCommit() { 363 void CompositorImpl::didCommit() {
351 } 364 }
352 365
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 case ANDROID_BITMAP_FORMAT_RGBA_8888: 437 case ANDROID_BITMAP_FORMAT_RGBA_8888:
425 return GL_UNSIGNED_BYTE; 438 return GL_UNSIGNED_BYTE;
426 break; 439 break;
427 case ANDROID_BITMAP_FORMAT_RGB_565: 440 case ANDROID_BITMAP_FORMAT_RGB_565:
428 default: 441 default:
429 return GL_UNSIGNED_SHORT_5_6_5; 442 return GL_UNSIGNED_SHORT_5_6_5;
430 } 443 }
431 } 444 }
432 445
433 } // namespace content 446 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698