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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 10796096: Add tracing of all memory allocated in all contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add global memory usage tracking Created 8 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
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 #include "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "gpu/command_buffer/client/gles2_lib.h" 10 #include "gpu/command_buffer/client/gles2_lib.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 { 86 {
87 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); 87 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager();
88 transfer_buffer_manager_.reset(manager); 88 transfer_buffer_manager_.reset(manager);
89 manager->Initialize(); 89 manager->Initialize();
90 } 90 }
91 scoped_ptr<gpu::CommandBufferService> command_buffer( 91 scoped_ptr<gpu::CommandBufferService> command_buffer(
92 new gpu::CommandBufferService(transfer_buffer_manager_.get())); 92 new gpu::CommandBufferService(transfer_buffer_manager_.get()));
93 if (!command_buffer->Initialize()) 93 if (!command_buffer->Initialize())
94 return NULL; 94 return NULL;
95 95
96 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); 96 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL,
97 NULL,
98 true));
97 99
98 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 100 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
99 if (!decoder_.get()) 101 if (!decoder_.get())
100 return EGL_NO_SURFACE; 102 return EGL_NO_SURFACE;
101 103
102 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), 104 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(),
103 decoder_.get(), 105 decoder_.get(),
104 NULL)); 106 NULL));
105 107
106 decoder_->set_engine(gpu_scheduler_.get()); 108 decoder_->set_engine(gpu_scheduler_.get());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } else { 217 } else {
216 DCHECK(IsValidSurface(draw)); 218 DCHECK(IsValidSurface(draw));
217 DCHECK(IsValidSurface(read)); 219 DCHECK(IsValidSurface(read));
218 DCHECK(IsValidContext(ctx)); 220 DCHECK(IsValidContext(ctx));
219 gles2::SetGLContext(context_.get()); 221 gles2::SetGLContext(context_.get());
220 } 222 }
221 return true; 223 return true;
222 } 224 }
223 225
224 } // namespace egl 226 } // namespace egl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698