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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 2363e5346ee01712513a0217ae6e0ece0652a12c..8ce9a6241ed8218effacc8e4829dda3729b2922d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3112,7 +3112,7 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
state_.bound_draw_framebuffer = NULL;
state_.bound_renderbuffer = NULL;
- if (offscreen_saved_color_texture_info_) {
+ if (offscreen_saved_color_texture_info_.get()) {
DCHECK(offscreen_target_color_texture_);
DCHECK_EQ(offscreen_saved_color_texture_info_->service_id(),
offscreen_saved_color_texture_->id());
@@ -5586,7 +5586,7 @@ bool GLES2DecoderImpl::SetBlackTextureForNonRenderableTextures() {
if (texture_unit_index < state_.texture_units.size()) {
TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
TextureRef* texture =
- texture_unit.GetInfoForSamplerType(uniform_info->type);
+ texture_unit.GetInfoForSamplerType(uniform_info->type).get();
if (!texture || !texture_manager()->CanRender(texture)) {
textures_set = true;
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
@@ -5658,7 +5658,7 @@ bool GLES2DecoderImpl::ClearUnclearedTextures() {
if (texture_unit_index < state_.texture_units.size()) {
TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
TextureRef* texture_ref =
- texture_unit.GetInfoForSamplerType(uniform_info->type);
+ texture_unit.GetInfoForSamplerType(uniform_info->type).get();
if (texture_ref && !texture_ref->texture()->SafeToRenderFrom()) {
if (!texture_manager()->ClearRenderableLevels(this, texture_ref)) {
return false;
« no previous file with comments | « gpu/command_buffer/service/buffer_manager.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698