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

Side by Side Diff: content/common/gpu/image_transport_surface_calayer_mac.mm

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_calayer_mac.h" 5 #include "content/common/gpu/image_transport_surface_calayer_mac.h"
6 6
7 #include <OpenGL/CGLRenderers.h> 7 #include <OpenGL/CGLRenderers.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 forLayerTime:timeInterval 87 forLayerTime:timeInterval
88 displayTime:timeStamp]; 88 displayTime:timeStamp];
89 } 89 }
90 90
91 @end 91 @end
92 92
93 namespace content { 93 namespace content {
94 94
95 CALayerStorageProvider::CALayerStorageProvider( 95 CALayerStorageProvider::CALayerStorageProvider(
96 ImageTransportSurfaceFBO* transport_surface) 96 ImageTransportSurfaceFBO* transport_surface)
97 : transport_surface_(transport_surface), 97 : transport_surface_(transport_surface),
98 gpu_vsync_disabled_(CommandLine::ForCurrentProcess()->HasSwitch( 98 gpu_vsync_disabled_(base::CommandLine::ForCurrentProcess()->HasSwitch(
99 switches::kDisableGpuVsync)), 99 switches::kDisableGpuVsync)),
100 throttling_disabled_(false), 100 throttling_disabled_(false),
101 has_pending_draw_(false), 101 has_pending_draw_(false),
102 can_draw_returned_false_count_(0), 102 can_draw_returned_false_count_(0),
103 fbo_texture_(0), 103 fbo_texture_(0),
104 fbo_scale_factor_(1), 104 fbo_scale_factor_(1),
105 recreate_layer_after_gpu_switch_(false), 105 recreate_layer_after_gpu_switch_(false),
106 pending_draw_weak_factory_(this) { 106 pending_draw_weak_factory_(this) {
107 ui::GpuSwitchingManager::GetInstance()->AddObserver(this); 107 ui::GpuSwitchingManager::GetInstance()->AddObserver(this);
108 } 108 }
109 109
110 CALayerStorageProvider::~CALayerStorageProvider() { 110 CALayerStorageProvider::~CALayerStorageProvider() {
111 ui::GpuSwitchingManager::GetInstance()->RemoveObserver(this); 111 ui::GpuSwitchingManager::GetInstance()->RemoveObserver(this);
112 } 112 }
113 113
114 gfx::Size CALayerStorageProvider::GetRoundedSize(gfx::Size size) { 114 gfx::Size CALayerStorageProvider::GetRoundedSize(gfx::Size size) {
115 return size; 115 return size;
116 } 116 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 return; 371 return;
372 pending_draw_weak_factory_.InvalidateWeakPtrs(); 372 pending_draw_weak_factory_.InvalidateWeakPtrs();
373 has_pending_draw_ = false; 373 has_pending_draw_ = false;
374 transport_surface_->SendSwapBuffers( 374 transport_surface_->SendSwapBuffers(
375 ui::SurfaceHandleFromCAContextID([context_ contextId]), 375 ui::SurfaceHandleFromCAContextID([context_ contextId]),
376 fbo_pixel_size_, 376 fbo_pixel_size_,
377 fbo_scale_factor_); 377 fbo_scale_factor_);
378 } 378 }
379 379
380 } // namespace content 380 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/media/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698