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

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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 FastSetActiveURL(active_url_, active_url_hash_); 126 FastSetActiveURL(active_url_, active_url_hash_);
127 if (share_group) { 127 if (share_group) {
128 context_group_ = share_group->context_group_; 128 context_group_ = share_group->context_group_;
129 } else { 129 } else {
130 context_group_ = new gpu::gles2::ContextGroup( 130 context_group_ = new gpu::gles2::ContextGroup(
131 mailbox_manager, 131 mailbox_manager,
132 image_manager, 132 image_manager,
133 new GpuCommandBufferMemoryTracker(channel), 133 new GpuCommandBufferMemoryTracker(channel),
134 true); 134 true);
135 } 135 }
136 if (handle_.sync_point)
137 OnWaitSyncPoint(handle_.sync_point);
138 } 136 }
139 137
140 GpuCommandBufferStub::~GpuCommandBufferStub() { 138 GpuCommandBufferStub::~GpuCommandBufferStub() {
141 Destroy(); 139 Destroy();
142 140
143 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 141 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
144 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); 142 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id()));
145 } 143 }
146 144
147 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() { 145 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() {
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 // made current before calling methods on the surface. 847 // made current before calling methods on the surface.
850 if (!surface_ || !MakeCurrent()) 848 if (!surface_ || !MakeCurrent())
851 return; 849 return;
852 surface_->SetFrontbufferAllocation( 850 surface_->SetFrontbufferAllocation(
853 allocation.browser_allocation.suggest_have_frontbuffer); 851 allocation.browser_allocation.suggest_have_frontbuffer);
854 } 852 }
855 853
856 } // namespace content 854 } // namespace content
857 855
858 #endif // defined(ENABLE_GPU) 856 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698