Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
index 24e5f60dbc92fbc66edda2f022671b3b986abc34..ef93a906d57da8977c7ca7f53580d772a585484a 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
@@ -78,7 +78,8 @@ GLES2DecoderPassthroughImpl::GLES2DecoderPassthroughImpl(ContextGroup* group) |
context_(), |
offscreen_(false), |
group_(group), |
- feature_info_(new FeatureInfo) { |
+ feature_info_(new FeatureInfo), |
+ weak_ptr_factory_(this) { |
DCHECK(group); |
} |
@@ -153,6 +154,10 @@ const char* GLES2DecoderPassthroughImpl::GetCommandName( |
return GetCommonCommandName(static_cast<cmd::CommandId>(command_id)); |
} |
+base::WeakPtr<GLES2Decoder> GLES2DecoderPassthroughImpl::AsWeakPtr() { |
+ return weak_ptr_factory_.GetWeakPtr(); |
+} |
+ |
bool GLES2DecoderPassthroughImpl::Initialize( |
const scoped_refptr<gl::GLSurface>& surface, |
const scoped_refptr<gl::GLContext>& context, |