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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 CompositorImpl::OffscreenContextProviderForCompositorThread() { | 381 CompositorImpl::OffscreenContextProviderForCompositorThread() { |
382 // There is no support for offscreen contexts, or compositor filters that | 382 // There is no support for offscreen contexts, or compositor filters that |
383 // would require them in this compositor instance. If they are needed, | 383 // would require them in this compositor instance. If they are needed, |
384 // then implement a context provider that provides contexts from | 384 // then implement a context provider that provides contexts from |
385 // ImageTransportSurfaceAndroid. | 385 // ImageTransportSurfaceAndroid. |
386 return NULL; | 386 return NULL; |
387 } | 387 } |
388 | 388 |
389 void CompositorImpl::OnViewContextSwapBuffersPosted() { | 389 void CompositorImpl::OnViewContextSwapBuffersPosted() { |
390 TRACE_EVENT0("compositor", "CompositorImpl::OnViewContextSwapBuffersPosted"); | 390 TRACE_EVENT0("compositor", "CompositorImpl::OnViewContextSwapBuffersPosted"); |
| 391 client_->OnSwapBuffersPosted(); |
391 } | 392 } |
392 | 393 |
393 void CompositorImpl::OnViewContextSwapBuffersComplete() { | 394 void CompositorImpl::OnViewContextSwapBuffersComplete() { |
394 TRACE_EVENT0("compositor", | 395 TRACE_EVENT0("compositor", |
395 "CompositorImpl::OnViewContextSwapBuffersComplete"); | 396 "CompositorImpl::OnViewContextSwapBuffersComplete"); |
396 client_->OnSwapBuffersCompleted(); | 397 client_->OnSwapBuffersCompleted(); |
397 } | 398 } |
398 | 399 |
399 void CompositorImpl::OnViewContextSwapBuffersAborted() { | 400 void CompositorImpl::OnViewContextSwapBuffersAborted() { |
400 TRACE_EVENT0("compositor", "CompositorImpl::OnViewContextSwapBuffersAborted"); | 401 TRACE_EVENT0("compositor", "CompositorImpl::OnViewContextSwapBuffersAborted"); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 case ANDROID_BITMAP_FORMAT_RGBA_8888: | 446 case ANDROID_BITMAP_FORMAT_RGBA_8888: |
446 return GL_UNSIGNED_BYTE; | 447 return GL_UNSIGNED_BYTE; |
447 break; | 448 break; |
448 case ANDROID_BITMAP_FORMAT_RGB_565: | 449 case ANDROID_BITMAP_FORMAT_RGB_565: |
449 default: | 450 default: |
450 return GL_UNSIGNED_SHORT_5_6_5; | 451 return GL_UNSIGNED_SHORT_5_6_5; |
451 } | 452 } |
452 } | 453 } |
453 | 454 |
454 } // namespace content | 455 } // namespace content |
OLD | NEW |