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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 29 matching lines...) Expand all
40 #include "content/common/gpu/gpu_process_launch_causes.h" 40 #include "content/common/gpu/gpu_process_launch_causes.h"
41 #include "content/common/host_shared_bitmap_manager.h" 41 #include "content/common/host_shared_bitmap_manager.h"
42 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
43 #include "gpu/GLES2/gl2extchromium.h" 43 #include "gpu/GLES2/gl2extchromium.h"
44 #include "gpu/command_buffer/client/gles2_interface.h" 44 #include "gpu/command_buffer/client/gles2_interface.h"
45 #include "gpu/command_buffer/common/mailbox.h" 45 #include "gpu/command_buffer/common/mailbox.h"
46 #include "third_party/khronos/GLES2/gl2.h" 46 #include "third_party/khronos/GLES2/gl2.h"
47 #include "ui/compositor/compositor.h" 47 #include "ui/compositor/compositor.h"
48 #include "ui/compositor/compositor_constants.h" 48 #include "ui/compositor/compositor_constants.h"
49 #include "ui/compositor/compositor_switches.h" 49 #include "ui/compositor/compositor_switches.h"
50 #include "ui/compositor/layer.h"
50 #include "ui/gfx/geometry/size.h" 51 #include "ui/gfx/geometry/size.h"
51 #include "ui/gfx/native_widget_types.h" 52 #include "ui/gfx/native_widget_types.h"
52 53
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
54 #include "content/browser/compositor/software_output_device_win.h" 55 #include "content/browser/compositor/software_output_device_win.h"
55 #elif defined(USE_OZONE) 56 #elif defined(USE_OZONE)
56 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor_ozone.h" 57 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor_ozone.h"
57 #include "content/browser/compositor/software_output_device_ozone.h" 58 #include "content/browser/compositor/software_output_device_ozone.h"
58 #include "ui/ozone/public/overlay_manager_ozone.h" 59 #include "ui/ozone/public/overlay_manager_ozone.h"
59 #include "ui/ozone/public/ozone_platform.h" 60 #include "ui/ozone/public/ozone_platform.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ReflectorImpl* reflector; 96 ReflectorImpl* reflector;
96 scoped_ptr<cc::OnscreenDisplayClient> display_client; 97 scoped_ptr<cc::OnscreenDisplayClient> display_client;
97 98
98 PerCompositorData() : surface_id(0), surface(nullptr), reflector(nullptr) {} 99 PerCompositorData() : surface_id(0), surface(nullptr), reflector(nullptr) {}
99 }; 100 };
100 101
101 GpuProcessTransportFactory::GpuProcessTransportFactory() 102 GpuProcessTransportFactory::GpuProcessTransportFactory()
102 : next_surface_id_namespace_(1u), 103 : next_surface_id_namespace_(1u),
103 task_graph_runner_(new cc::TaskGraphRunner), 104 task_graph_runner_(new cc::TaskGraphRunner),
104 callback_factory_(this) { 105 callback_factory_(this) {
106 ui::Layer::InitializeUILayerSettings();
107
105 if (UseSurfacesEnabled()) 108 if (UseSurfacesEnabled())
106 surface_manager_ = make_scoped_ptr(new cc::SurfaceManager); 109 surface_manager_ = make_scoped_ptr(new cc::SurfaceManager);
107 110
108 if (ui::IsUIImplSidePaintingEnabled()) { 111 if (ui::IsUIImplSidePaintingEnabled()) {
109 raster_thread_.reset(new RasterThread(task_graph_runner_.get())); 112 raster_thread_.reset(new RasterThread(task_graph_runner_.get()));
110 raster_thread_->Start(); 113 raster_thread_->Start();
111 } 114 }
112 #if defined(OS_WIN) 115 #if defined(OS_WIN)
113 software_backing_.reset(new OutputDeviceBacking); 116 software_backing_.reset(new OutputDeviceBacking);
114 #endif 117 #endif
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 612 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
610 observer_list_, 613 observer_list_,
611 OnLostResources()); 614 OnLostResources());
612 615
613 // Kill things that use the shared context before killing the shared context. 616 // Kill things that use the shared context before killing the shared context.
614 lost_gl_helper.reset(); 617 lost_gl_helper.reset();
615 lost_shared_main_thread_contexts = NULL; 618 lost_shared_main_thread_contexts = NULL;
616 } 619 }
617 620
618 } // namespace content 621 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/overscroll_glow.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698