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

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

Issue 226423002: Merge 261120 "gpu: Lose context when BeginQueryEXT fails to allo..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: Created 6 years, 8 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 bool bind_generates_resource = false;
401 bool lose_context_when_out_of_memory = true;
400 return make_scoped_ptr( 402 return make_scoped_ptr(
401 new WebGraphicsContext3DCommandBufferImpl(surface_id, 403 new WebGraphicsContext3DCommandBufferImpl(surface_id,
402 url, 404 url,
403 gpu_channel_host.get(), 405 gpu_channel_host.get(),
404 attributes, 406 attributes,
405 false, 407 bind_generates_resource,
408 lose_context_when_out_of_memory,
406 limits, 409 limits,
407 NULL)); 410 NULL));
408 } 411 }
409 412
410 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( 413 scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
411 bool fallback) { 414 bool fallback) {
412 blink::WebGraphicsContext3D::Attributes attrs; 415 blink::WebGraphicsContext3D::Attributes attrs;
413 attrs.shareResources = true; 416 attrs.shareResources = true;
414 attrs.noAutomaticFlushes = true; 417 attrs.noAutomaticFlushes = true;
415 418
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 467
465 void CompositorImpl::DidCommit() { 468 void CompositorImpl::DidCommit() {
466 root_window_->OnCompositingDidCommit(); 469 root_window_->OnCompositingDidCommit();
467 } 470 }
468 471
469 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { 472 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) {
470 root_layer_->AddChild(layer); 473 root_layer_->AddChild(layer);
471 } 474 }
472 475
473 } // namespace content 476 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_ipc_browsertests.cc ('k') | content/browser/renderer_host/image_transport_factory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698