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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 10083056: GpuMemoryManager suggests values for renderer Contents Texture Managers' preferred memory limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 last_flush_count_(0), 60 last_flush_count_(0),
61 allocation_(GpuMemoryAllocation::INVALID_RESOURCE_SIZE, true, true), 61 allocation_(GpuMemoryAllocation::INVALID_RESOURCE_SIZE, true, true),
62 parent_stub_for_initialization_(), 62 parent_stub_for_initialization_(),
63 parent_texture_for_initialization_(0), 63 parent_texture_for_initialization_(0),
64 watchdog_(watchdog) { 64 watchdog_(watchdog) {
65 if (share_group) { 65 if (share_group) {
66 context_group_ = share_group->context_group_; 66 context_group_ = share_group->context_group_;
67 } else { 67 } else {
68 context_group_ = new gpu::gles2::ContextGroup(true); 68 context_group_ = new gpu::gles2::ContextGroup(true);
69 } 69 }
70 if (surface_id != 0) 70 if (surface_id != 0 && !handle.is_null())
mmocny 2012/04/18 20:43:11 !is_null() seems insufficient to ignore ui stub. T
71 surface_state_.reset(new GpuCommandBufferStubBase::SurfaceState( 71 surface_state_.reset(new GpuCommandBufferStubBase::SurfaceState(
72 surface_id, true, base::TimeTicks::Now())); 72 surface_id, true, base::TimeTicks::Now()));
73 } 73 }
74 74
75 GpuCommandBufferStub::~GpuCommandBufferStub() { 75 GpuCommandBufferStub::~GpuCommandBufferStub() {
76 Destroy(); 76 Destroy();
77 77
78 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 78 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
79 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); 79 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id()));
80 } 80 }
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 631 }
632 632
633 void GpuCommandBufferStub::SetMemoryAllocation( 633 void GpuCommandBufferStub::SetMemoryAllocation(
634 const GpuMemoryAllocation& allocation) { 634 const GpuMemoryAllocation& allocation) {
635 allocation_ = allocation; 635 allocation_ = allocation;
636 636
637 SendMemoryAllocationToProxy(allocation); 637 SendMemoryAllocationToProxy(allocation);
638 } 638 }
639 639
640 #endif // defined(ENABLE_GPU) 640 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698