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

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

Issue 2898953002: Remove SupportsWeakPtr inheritance from GLES2Decoder (Closed)
Patch Set: Created 3 years, 7 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/gles2_cmd_decoder_passthrough.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698