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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 8411002: Fix a smart pointer leak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 uint64* surface_id, 1120 uint64* surface_id,
1121 TransportDIB::Handle* surface_handle) { 1121 TransportDIB::Handle* surface_handle) {
1122 scoped_refptr<AcceleratedSurfaceContainerLinux> surface( 1122 scoped_refptr<AcceleratedSurfaceContainerLinux> surface(
1123 AcceleratedSurfaceContainerLinux::Create(gfx::Size(width, height))); 1123 AcceleratedSurfaceContainerLinux::Create(gfx::Size(width, height)));
1124 if (!surface->Initialize(surface_id)) { 1124 if (!surface->Initialize(surface_id)) {
1125 LOG(ERROR) << "Failed to create AcceleratedSurfaceContainer"; 1125 LOG(ERROR) << "Failed to create AcceleratedSurfaceContainer";
1126 return; 1126 return;
1127 } 1127 }
1128 *surface_handle = surface->Handle(); 1128 *surface_handle = surface->Handle();
1129 1129
1130 accelerated_surface_containers_[*surface_id] = surface.release(); 1130 accelerated_surface_containers_[*surface_id] = surface;
1131 } 1131 }
1132 1132
1133 void RenderWidgetHostViewViews::AcceleratedSurfaceRelease(uint64 surface_id) { 1133 void RenderWidgetHostViewViews::AcceleratedSurfaceRelease(uint64 surface_id) {
1134 accelerated_surface_containers_.erase(surface_id); 1134 accelerated_surface_containers_.erase(surface_id);
1135 } 1135 }
1136 1136
1137 void RenderWidgetHostViewViews::AcceleratedSurfaceBuffersSwapped( 1137 void RenderWidgetHostViewViews::AcceleratedSurfaceBuffersSwapped(
1138 uint64 surface_id, 1138 uint64 surface_id,
1139 int32 route_id, 1139 int32 route_id,
1140 int gpu_host_id) { 1140 int gpu_host_id) {
(...skipping 17 matching lines...) Expand all
1158 for (std::vector< base::Callback<void(void)> >::const_iterator 1158 for (std::vector< base::Callback<void(void)> >::const_iterator
1159 it = on_compositing_ended_callbacks_.begin(); 1159 it = on_compositing_ended_callbacks_.begin();
1160 it != on_compositing_ended_callbacks_.end(); ++it) { 1160 it != on_compositing_ended_callbacks_.end(); ++it) {
1161 it->Run(); 1161 it->Run();
1162 } 1162 }
1163 on_compositing_ended_callbacks_.clear(); 1163 on_compositing_ended_callbacks_.clear();
1164 compositor->RemoveObserver(this); 1164 compositor->RemoveObserver(this);
1165 } 1165 }
1166 1166
1167 #endif 1167 #endif
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698