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

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

Issue 7633060: Add option to not generate resources on bind in OpenGL ES (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl fix Created 9 years, 4 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
« no previous file with comments | « no previous file | content/renderer/gpu/renderer_gl_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 requested_attribs_(attribs), 48 requested_attribs_(attribs),
49 route_id_(route_id), 49 route_id_(route_id),
50 software_(software), 50 software_(software),
51 last_flush_count_(0), 51 last_flush_count_(0),
52 renderer_id_(renderer_id), 52 renderer_id_(renderer_id),
53 render_view_id_(render_view_id), 53 render_view_id_(render_view_id),
54 parent_stub_for_initialization_(), 54 parent_stub_for_initialization_(),
55 parent_texture_for_initialization_(0), 55 parent_texture_for_initialization_(0),
56 watchdog_(watchdog), 56 watchdog_(watchdog),
57 task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 57 task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
58 if (share_group) 58 if (share_group) {
59 context_group_ = share_group->context_group_; 59 context_group_ = share_group->context_group_;
60 else 60 } else {
61 context_group_ = new gpu::gles2::ContextGroup; 61 // TODO(gman): this needs to be false for everything but Pepper.
62 bool bind_generates_resource = true;
63 context_group_ = new gpu::gles2::ContextGroup(bind_generates_resource);
64 }
62 } 65 }
63 66
64 GpuCommandBufferStub::~GpuCommandBufferStub() { 67 GpuCommandBufferStub::~GpuCommandBufferStub() {
65 if (scheduler_.get()) { 68 if (scheduler_.get()) {
66 scheduler_->Destroy(); 69 scheduler_->Destroy();
67 } 70 }
68 71
69 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 72 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
70 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer( 73 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(
71 handle_, renderer_id_, render_view_id_)); 74 handle_, renderer_id_, render_view_id_));
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 new GpuVideoDecodeAccelerator(this, route_id_, this)); 561 new GpuVideoDecodeAccelerator(this, route_id_, this));
559 video_decoder_->Initialize(configs, reply_message); 562 video_decoder_->Initialize(configs, reply_message);
560 } 563 }
561 564
562 void GpuCommandBufferStub::OnDestroyVideoDecoder() { 565 void GpuCommandBufferStub::OnDestroyVideoDecoder() {
563 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder"; 566 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder";
564 video_decoder_.reset(); 567 video_decoder_.reset();
565 } 568 }
566 569
567 #endif // defined(ENABLE_GPU) 570 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « no previous file | content/renderer/gpu/renderer_gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698