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

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

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get())); 267 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get()));
268 268
269 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), 269 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(),
270 decoder_.get(), 270 decoder_.get(),
271 decoder_.get())); 271 decoder_.get()));
272 if (preempt_by_counter_.get()) 272 if (preempt_by_counter_.get())
273 scheduler_->SetPreemptByCounter(preempt_by_counter_); 273 scheduler_->SetPreemptByCounter(preempt_by_counter_);
274 274
275 decoder_->set_engine(scheduler_.get()); 275 decoder_->set_engine(scheduler_.get());
276 276
277 printf("initializing command buffer stub; handle is %s and has textures %u and %u\n", handle_.is_null() ? "null" : "not null", handle_.parent_texture_id[0], h andle_.parent_texture_id[1]);
Fady Samuel 2012/07/06 15:14:44 Delete once you're done debugging please.
277 if (!handle_.is_null()) { 278 if (!handle_.is_null()) {
278 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 279 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
279 if (software_) { 280 if (software_) {
280 DLOG(ERROR) << "No software support.\n"; 281 DLOG(ERROR) << "No software support.\n";
281 OnInitializeFailed(reply_message); 282 OnInitializeFailed(reply_message);
282 return; 283 return;
283 } 284 }
284 #endif 285 #endif
285 286
286 surface_ = ImageTransportSurface::CreateSurface( 287 surface_ = ImageTransportSurface::CreateSurface(
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 const GpuMemoryAllocation& allocation) { 742 const GpuMemoryAllocation& allocation) {
742 Send(new GpuCommandBufferMsg_SetMemoryAllocation(route_id_, allocation)); 743 Send(new GpuCommandBufferMsg_SetMemoryAllocation(route_id_, allocation));
743 // This can be called outside of OnMessageReceived, so the context needs to be 744 // This can be called outside of OnMessageReceived, so the context needs to be
744 // made current before calling methods on the surface. 745 // made current before calling methods on the surface.
745 if (!surface_ || !MakeCurrent()) 746 if (!surface_ || !MakeCurrent())
746 return; 747 return;
747 surface_->SetFrontbufferAllocation(allocation.suggest_have_frontbuffer); 748 surface_->SetFrontbufferAllocation(allocation.suggest_have_frontbuffer);
748 } 749 }
749 750
750 #endif // defined(ENABLE_GPU) 751 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698