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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 #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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 context_group_ = share_group->context_group_; 137 context_group_ = share_group->context_group_;
138 } else { 138 } else {
139 context_group_ = new gpu::gles2::ContextGroup( 139 context_group_ = new gpu::gles2::ContextGroup(
140 mailbox_manager, 140 mailbox_manager,
141 image_manager, 141 image_manager,
142 new GpuCommandBufferMemoryTracker(channel), 142 new GpuCommandBufferMemoryTracker(channel),
143 true); 143 true);
144 } 144 }
145 memory_manager_state_.reset(new GpuCommandBufferStubBase::MemoryManagerState( 145 memory_manager_state_.reset(new GpuCommandBufferStubBase::MemoryManagerState(
146 surface_id != 0, true, base::TimeTicks::Now())); 146 surface_id != 0, true, base::TimeTicks::Now()));
147 if (handle_.sync_point)
148 OnWaitSyncPoint(handle_.sync_point);
149 } 147 }
150 148
151 GpuCommandBufferStub::~GpuCommandBufferStub() { 149 GpuCommandBufferStub::~GpuCommandBufferStub() {
152 Destroy(); 150 Destroy();
153 151
154 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 152 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
155 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); 153 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id()));
156 } 154 }
157 155
158 bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { 156 bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 // made current before calling methods on the surface. 840 // made current before calling methods on the surface.
843 if (!surface_ || !MakeCurrent()) 841 if (!surface_ || !MakeCurrent())
844 return; 842 return;
845 surface_->SetFrontbufferAllocation( 843 surface_->SetFrontbufferAllocation(
846 allocation.browser_allocation.suggest_have_frontbuffer); 844 allocation.browser_allocation.suggest_have_frontbuffer);
847 } 845 }
848 846
849 } // namespace content 847 } // namespace content
850 848
851 #endif // defined(ENABLE_GPU) 849 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698