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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 567943002: Refactoring the weak_ptr_factory order content/browser folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving swarming errors 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 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/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 namespace content { 63 namespace content {
64 64
65 struct GpuProcessTransportFactory::PerCompositorData { 65 struct GpuProcessTransportFactory::PerCompositorData {
66 int surface_id; 66 int surface_id;
67 scoped_refptr<ReflectorImpl> reflector; 67 scoped_refptr<ReflectorImpl> reflector;
68 scoped_ptr<OnscreenDisplayClient> display_client; 68 scoped_ptr<OnscreenDisplayClient> display_client;
69 }; 69 };
70 70
71 GpuProcessTransportFactory::GpuProcessTransportFactory() 71 GpuProcessTransportFactory::GpuProcessTransportFactory()
72 : callback_factory_(this), 72 : next_surface_id_namespace_(1u),
73 next_surface_id_namespace_(1u) { 73 callback_factory_(this) {
74 output_surface_proxy_ = new BrowserCompositorOutputSurfaceProxy( 74 output_surface_proxy_ = new BrowserCompositorOutputSurfaceProxy(
75 &output_surface_map_); 75 &output_surface_map_);
76 #if defined(OS_CHROMEOS) 76 #if defined(OS_CHROMEOS)
77 bool use_thread = !base::CommandLine::ForCurrentProcess()->HasSwitch( 77 bool use_thread = !base::CommandLine::ForCurrentProcess()->HasSwitch(
78 switches::kUIDisableThreadedCompositing); 78 switches::kUIDisableThreadedCompositing);
79 #else 79 #else
80 bool use_thread = false; 80 bool use_thread = false;
81 #endif 81 #endif
82 if (use_thread) { 82 if (use_thread) {
83 compositor_thread_.reset(new base::Thread("Browser Compositor")); 83 compositor_thread_.reset(new base::Thread("Browser Compositor"));
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 472 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
473 observer_list_, 473 observer_list_,
474 OnLostResources()); 474 OnLostResources());
475 475
476 // Kill things that use the shared context before killing the shared context. 476 // Kill things that use the shared context before killing the shared context.
477 lost_gl_helper.reset(); 477 lost_gl_helper.reset();
478 lost_shared_main_thread_contexts = NULL; 478 lost_shared_main_thread_contexts = NULL;
479 } 479 }
480 480
481 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/devtools/devtools_tracing_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698