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

Unified Diff: gpu/command_buffer/service/gpu_processor.cc

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_processor.h ('k') | gpu/command_buffer/service/gpu_processor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_processor.cc
===================================================================
--- gpu/command_buffer/service/gpu_processor.cc (revision 42644)
+++ gpu/command_buffer/service/gpu_processor.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/callback.h"
+#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "gpu/command_buffer/service/gpu_processor.h"
@@ -12,7 +13,8 @@
GPUProcessor::GPUProcessor(CommandBuffer* command_buffer)
: command_buffer_(command_buffer),
- commands_per_update_(100) {
+ commands_per_update_(100),
+ method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(command_buffer);
decoder_.reset(gles2::GLES2Decoder::Create(&group_));
decoder_->set_engine(this);
@@ -23,13 +25,15 @@
CommandParser* parser,
int commands_per_update)
: command_buffer_(command_buffer),
- commands_per_update_(commands_per_update) {
+ commands_per_update_(commands_per_update),
+ method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(command_buffer);
decoder_.reset(decoder);
parser_.reset(parser);
}
GPUProcessor::~GPUProcessor() {
+ Destroy();
}
void GPUProcessor::ProcessCommands() {
@@ -59,7 +63,8 @@
if (!parser_->IsEmpty()) {
MessageLoop::current()->PostTask(
- FROM_HERE, NewRunnableMethod(this, &GPUProcessor::ProcessCommands));
+ FROM_HERE,
+ method_factory_.NewRunnableMethod(&GPUProcessor::ProcessCommands));
}
}
@@ -83,6 +88,10 @@
return parser_->get();
}
+void GPUProcessor::ResizeOffscreenFrameBuffer(const gfx::Size& size) {
+ decoder_->ResizeOffscreenFrameBuffer(size);
+}
+
#if defined(OS_MACOSX)
uint64 GPUProcessor::SetWindowSizeForIOSurface(int32 width, int32 height) {
return decoder_->SetWindowSizeForIOSurface(width, height);
« no previous file with comments | « gpu/command_buffer/service/gpu_processor.h ('k') | gpu/command_buffer/service/gpu_processor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698