| 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 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 false, | 365 false, |
| 366 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE))
{ | 366 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE))
{ |
| 367 LOG(ERROR) << "Failed to create 3D context for compositor."; | 367 LOG(ERROR) << "Failed to create 3D context for compositor."; |
| 368 return scoped_ptr<cc::OutputSurface>(); | 368 return scoped_ptr<cc::OutputSurface>(); |
| 369 } | 369 } |
| 370 return make_scoped_ptr(new cc::OutputSurface( | 370 return make_scoped_ptr(new cc::OutputSurface( |
| 371 context.PassAs<WebKit::WebGraphicsContext3D>())); | 371 context.PassAs<WebKit::WebGraphicsContext3D>())); |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 | 374 |
| 375 scoped_ptr<cc::InputHandlerClient> CompositorImpl::CreateInputHandlerClient() { | |
| 376 return scoped_ptr<cc::InputHandlerClient>(); | |
| 377 } | |
| 378 | |
| 379 void CompositorImpl::DidCompleteSwapBuffers() { | 375 void CompositorImpl::DidCompleteSwapBuffers() { |
| 380 client_->OnSwapBuffersCompleted(); | 376 client_->OnSwapBuffersCompleted(); |
| 381 } | 377 } |
| 382 | 378 |
| 383 void CompositorImpl::ScheduleComposite() { | 379 void CompositorImpl::ScheduleComposite() { |
| 384 client_->ScheduleComposite(); | 380 client_->ScheduleComposite(); |
| 385 } | 381 } |
| 386 | 382 |
| 387 scoped_refptr<cc::ContextProvider> | 383 scoped_refptr<cc::ContextProvider> |
| 388 CompositorImpl::OffscreenContextProviderForMainThread() { | 384 CompositorImpl::OffscreenContextProviderForMainThread() { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 case ANDROID_BITMAP_FORMAT_RGBA_8888: | 458 case ANDROID_BITMAP_FORMAT_RGBA_8888: |
| 463 return GL_UNSIGNED_BYTE; | 459 return GL_UNSIGNED_BYTE; |
| 464 break; | 460 break; |
| 465 case ANDROID_BITMAP_FORMAT_RGB_565: | 461 case ANDROID_BITMAP_FORMAT_RGB_565: |
| 466 default: | 462 default: |
| 467 return GL_UNSIGNED_SHORT_5_6_5; | 463 return GL_UNSIGNED_SHORT_5_6_5; |
| 468 } | 464 } |
| 469 } | 465 } |
| 470 | 466 |
| 471 } // namespace content | 467 } // namespace content |
| OLD | NEW |