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

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

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 void ImageTransportHelper::SetSwapInterval(gfx::GLContext* context) { 139 void ImageTransportHelper::SetSwapInterval(gfx::GLContext* context) {
140 #if defined(OS_WIN) 140 #if defined(OS_WIN)
141 // If Aero Glass is enabled, then the renderer will handle ratelimiting and 141 // If Aero Glass is enabled, then the renderer will handle ratelimiting and
142 // there's no tearing, so waiting for vsync is unnecessary. 142 // there's no tearing, so waiting for vsync is unnecessary.
143 if (ui::win::IsAeroGlassEnabled()) { 143 if (ui::win::IsAeroGlassEnabled()) {
144 context->ForceSwapIntervalZero(true); 144 context->ForceSwapIntervalZero(true);
145 return; 145 return;
146 } 146 }
147 #endif 147 #endif
148 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync)) 148 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
149 switches::kDisableGpuVsync))
149 context->ForceSwapIntervalZero(true); 150 context->ForceSwapIntervalZero(true);
150 else 151 else
151 context->SetSwapInterval(1); 152 context->SetSwapInterval(1);
152 } 153 }
153 154
154 gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() { 155 gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() {
155 if (!stub_.get()) 156 if (!stub_.get())
156 return NULL; 157 return NULL;
157 return stub_->decoder(); 158 return stub_->decoder();
158 } 159 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { 272 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() {
272 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); 273 gfx::VSyncProvider* vsync_provider = GetVSyncProvider();
273 if (vsync_provider) { 274 if (vsync_provider) {
274 vsync_provider->GetVSyncParameters( 275 vsync_provider->GetVSyncParameters(
275 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, 276 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters,
276 helper_->AsWeakPtr())); 277 helper_->AsWeakPtr()));
277 } 278 }
278 } 279 }
279 280
280 } // namespace content 281 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/image_transport_surface_calayer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698