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

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

Issue 1354363002: Cleanup: Pass std::string as const reference from content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "content/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 void GpuChannelManager::OnUpdateValueState( 237 void GpuChannelManager::OnUpdateValueState(
238 int client_id, unsigned int target, const gpu::ValueState& state) { 238 int client_id, unsigned int target, const gpu::ValueState& state) {
239 // Only pass updated state to the channel corresponding to the 239 // Only pass updated state to the channel corresponding to the
240 // render_widget_host where the event originated. 240 // render_widget_host where the event originated.
241 auto it = gpu_channels_.find(client_id); 241 auto it = gpu_channels_.find(client_id);
242 if (it != gpu_channels_.end()) 242 if (it != gpu_channels_.end())
243 it->second->HandleUpdateValueState(target, state); 243 it->second->HandleUpdateValueState(target, state);
244 } 244 }
245 245
246 void GpuChannelManager::OnLoadedShader(std::string program_proto) { 246 void GpuChannelManager::OnLoadedShader(const std::string& program_proto) {
247 if (program_cache()) 247 if (program_cache())
248 program_cache()->LoadProgram(program_proto); 248 program_cache()->LoadProgram(program_proto);
249 } 249 }
250 250
251 uint32_t GpuChannelManager::GetUnprocessedOrderNum() const { 251 uint32_t GpuChannelManager::GetUnprocessedOrderNum() const {
252 uint32_t unprocessed_order_num = 0; 252 uint32_t unprocessed_order_num = 0;
253 for (auto& kv : gpu_channels_) { 253 for (auto& kv : gpu_channels_) {
254 unprocessed_order_num = 254 unprocessed_order_num =
255 std::max(unprocessed_order_num, kv.second->GetUnprocessedOrderNum()); 255 std::max(unprocessed_order_num, kv.second->GetUnprocessedOrderNum());
256 } 256 }
(...skipping 24 matching lines...) Expand all
281 281
282 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 282 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
283 if (!default_offscreen_surface_.get()) { 283 if (!default_offscreen_surface_.get()) {
284 default_offscreen_surface_ = 284 default_offscreen_surface_ =
285 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()); 285 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size());
286 } 286 }
287 return default_offscreen_surface_.get(); 287 return default_offscreen_surface_.get();
288 } 288 }
289 289
290 } // namespace content 290 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698