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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 limits.min_transfer_buffer_size = 64 * 1024; | 396 limits.min_transfer_buffer_size = 64 * 1024; |
397 limits.max_transfer_buffer_size = std::min( | 397 limits.max_transfer_buffer_size = std::min( |
398 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); | 398 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); |
399 limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024; | 399 limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024; |
400 return make_scoped_ptr( | 400 return make_scoped_ptr( |
401 new WebGraphicsContext3DCommandBufferImpl(surface_id, | 401 new WebGraphicsContext3DCommandBufferImpl(surface_id, |
402 url, | 402 url, |
403 gpu_channel_host.get(), | 403 gpu_channel_host.get(), |
404 attributes, | 404 attributes, |
405 false, | 405 false, |
406 limits)); | 406 limits, |
| 407 NULL)); |
407 } | 408 } |
408 | 409 |
409 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( | 410 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( |
410 bool fallback) { | 411 bool fallback) { |
411 blink::WebGraphicsContext3D::Attributes attrs; | 412 blink::WebGraphicsContext3D::Attributes attrs; |
412 attrs.shareResources = true; | 413 attrs.shareResources = true; |
413 attrs.noAutomaticFlushes = true; | 414 attrs.noAutomaticFlushes = true; |
414 | 415 |
415 DCHECK(window_); | 416 DCHECK(window_); |
416 DCHECK(surface_id_); | 417 DCHECK(surface_id_); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 void CompositorImpl::DidAbortSwapBuffers() { | 460 void CompositorImpl::DidAbortSwapBuffers() { |
460 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); | 461 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); |
461 client_->OnSwapBuffersCompleted(); | 462 client_->OnSwapBuffersCompleted(); |
462 } | 463 } |
463 | 464 |
464 void CompositorImpl::DidCommit() { | 465 void CompositorImpl::DidCommit() { |
465 root_window_->OnCompositingDidCommit(); | 466 root_window_->OnCompositingDidCommit(); |
466 } | 467 } |
467 | 468 |
468 } // namespace content | 469 } // namespace content |
OLD | NEW |