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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 503253003: Remove implicit conversions from scoped_refptr to T* in content/*/gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 return; 976 return;
977 } 977 }
978 978
979 GpuChannelManager* manager = channel_->gpu_channel_manager(); 979 GpuChannelManager* manager = channel_->gpu_channel_manager();
980 scoped_refptr<gfx::GLImage> image = 980 scoped_refptr<gfx::GLImage> image =
981 manager->gpu_memory_buffer_factory()->CreateImageForGpuMemoryBuffer( 981 manager->gpu_memory_buffer_factory()->CreateImageForGpuMemoryBuffer(
982 handle, 982 handle,
983 gfx::Size(width, height), 983 gfx::Size(width, height),
984 internalformat, 984 internalformat,
985 channel()->client_id()); 985 channel()->client_id());
986 if (!image) 986 if (!image.get())
987 return; 987 return;
988 988
989 // For Android specific workaround. 989 // For Android specific workaround.
990 if (context_group_->feature_info()->workarounds().release_image_after_use) 990 if (context_group_->feature_info()->workarounds().release_image_after_use)
991 image->SetReleaseAfterUse(); 991 image->SetReleaseAfterUse();
992 992
993 image_manager->AddImage(image.get(), id); 993 image_manager->AddImage(image.get(), id);
994 } 994 }
995 995
996 void GpuCommandBufferStub::OnUnregisterGpuMemoryBuffer(int32 id) { 996 void GpuCommandBufferStub::OnUnregisterGpuMemoryBuffer(int32 id) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 if (decoder_) 1101 if (decoder_)
1102 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); 1102 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB);
1103 command_buffer_->SetParseError(gpu::error::kLostContext); 1103 command_buffer_->SetParseError(gpu::error::kLostContext);
1104 } 1104 }
1105 1105
1106 uint64 GpuCommandBufferStub::GetMemoryUsage() const { 1106 uint64 GpuCommandBufferStub::GetMemoryUsage() const {
1107 return GetMemoryManager()->GetClientMemoryUsage(this); 1107 return GetMemoryManager()->GetClientMemoryUsage(this);
1108 } 1108 }
1109 1109
1110 } // namespace content 1110 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698