OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |