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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 57543004: Don't test kEnableThreadedCompositing in WebGraphicsContext3DCommandBufferImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 #include <map> 9 #include <map>
10 10
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 display_info.GetDisplayHeight() * 374 display_info.GetDisplayHeight() *
375 display_info.GetDisplayWidth() * 375 display_info.GetDisplayWidth() *
376 kBytesPerPixel; 376 kBytesPerPixel;
377 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 377 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
378 limits.command_buffer_size = 64 * 1024; 378 limits.command_buffer_size = 64 * 1024;
379 limits.start_transfer_buffer_size = 64 * 1024; 379 limits.start_transfer_buffer_size = 64 * 1024;
380 limits.min_transfer_buffer_size = 64 * 1024; 380 limits.min_transfer_buffer_size = 64 * 1024;
381 limits.max_transfer_buffer_size = std::min( 381 limits.max_transfer_buffer_size = std::min(
382 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); 382 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize);
383 limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024; 383 limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024;
384 bool use_echo_for_swap_ack = true;
384 return make_scoped_ptr( 385 return make_scoped_ptr(
385 new WebGraphicsContext3DCommandBufferImpl(surface_id, 386 new WebGraphicsContext3DCommandBufferImpl(surface_id,
386 url, 387 url,
387 gpu_channel_host.get(), 388 gpu_channel_host.get(),
388 compositor_impl, 389 compositor_impl,
390 use_echo_for_swap_ack,
389 attributes, 391 attributes,
390 false, 392 false,
391 limits)); 393 limits));
392 } 394 }
393 395
394 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( 396 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
395 bool fallback) { 397 bool fallback) {
396 WebKit::WebGraphicsContext3D::Attributes attrs; 398 WebKit::WebGraphicsContext3D::Attributes attrs;
397 attrs.shareResources = true; 399 attrs.shareResources = true;
398 attrs.noAutomaticFlushes = true; 400 attrs.noAutomaticFlushes = true;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 case ANDROID_BITMAP_FORMAT_RGBA_8888: 493 case ANDROID_BITMAP_FORMAT_RGBA_8888:
492 return GL_UNSIGNED_BYTE; 494 return GL_UNSIGNED_BYTE;
493 break; 495 break;
494 case ANDROID_BITMAP_FORMAT_RGB_565: 496 case ANDROID_BITMAP_FORMAT_RGB_565:
495 default: 497 default:
496 return GL_UNSIGNED_SHORT_5_6_5; 498 return GL_UNSIGNED_SHORT_5_6_5;
497 } 499 }
498 } 500 }
499 501
500 } // namespace content 502 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698