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

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

Issue 267683008: ChromeOS only version of r261563 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: Created 6 years, 7 months 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 display_info.GetDisplayHeight() * 390 display_info.GetDisplayHeight() *
391 display_info.GetDisplayWidth() * 391 display_info.GetDisplayWidth() *
392 kBytesPerPixel; 392 kBytesPerPixel;
393 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 393 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
394 limits.command_buffer_size = 64 * 1024; 394 limits.command_buffer_size = 64 * 1024;
395 limits.start_transfer_buffer_size = 64 * 1024; 395 limits.start_transfer_buffer_size = 64 * 1024;
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 #if !defined(OS_CHROMEOS)
400 bool bind_generates_resource = false; 401 bool bind_generates_resource = false;
402 #endif
401 bool lose_context_when_out_of_memory = true; 403 bool lose_context_when_out_of_memory = true;
402 return make_scoped_ptr( 404 return make_scoped_ptr(
403 new WebGraphicsContext3DCommandBufferImpl(surface_id, 405 new WebGraphicsContext3DCommandBufferImpl(surface_id,
404 url, 406 url,
405 gpu_channel_host.get(), 407 gpu_channel_host.get(),
406 attributes, 408 attributes,
409 #if !defined(OS_CHROMEOS)
407 bind_generates_resource, 410 bind_generates_resource,
411 #endif
408 lose_context_when_out_of_memory, 412 lose_context_when_out_of_memory,
409 limits, 413 limits,
410 NULL)); 414 NULL));
411 } 415 }
412 416
413 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( 417 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
414 bool fallback) { 418 bool fallback) {
415 blink::WebGraphicsContext3D::Attributes attrs; 419 blink::WebGraphicsContext3D::Attributes attrs;
416 attrs.shareResources = true; 420 attrs.shareResources = true;
417 attrs.noAutomaticFlushes = true; 421 attrs.noAutomaticFlushes = true;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 471
468 void CompositorImpl::DidCommit() { 472 void CompositorImpl::DidCommit() {
469 root_window_->OnCompositingDidCommit(); 473 root_window_->OnCompositingDidCommit();
470 } 474 }
471 475
472 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { 476 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) {
473 root_layer_->AddChild(layer); 477 root_layer_->AddChild(layer);
474 } 478 }
475 479
476 } // namespace content 480 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698