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

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

Issue 297573003: Make delegated software renderer work on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebas Created 6 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 "ui/gfx/size.h" 40 #include "ui/gfx/size.h"
41 41
42 #if defined(OS_WIN) 42 #if defined(OS_WIN)
43 #include "content/browser/compositor/software_output_device_win.h" 43 #include "content/browser/compositor/software_output_device_win.h"
44 #elif defined(USE_OZONE) 44 #elif defined(USE_OZONE)
45 #include "content/browser/compositor/overlay_candidate_validator_ozone.h" 45 #include "content/browser/compositor/overlay_candidate_validator_ozone.h"
46 #include "content/browser/compositor/software_output_device_ozone.h" 46 #include "content/browser/compositor/software_output_device_ozone.h"
47 #include "ui/gfx/ozone/surface_factory_ozone.h" 47 #include "ui/gfx/ozone/surface_factory_ozone.h"
48 #elif defined(USE_X11) 48 #elif defined(USE_X11)
49 #include "content/browser/compositor/software_output_device_x11.h" 49 #include "content/browser/compositor/software_output_device_x11.h"
50 #elif defined(OS_MACOSX)
51 #include "content/browser/compositor/software_output_device_mac.h"
50 #endif 52 #endif
51 53
52 using cc::ContextProvider; 54 using cc::ContextProvider;
53 using gpu::gles2::GLES2Interface; 55 using gpu::gles2::GLES2Interface;
54 56
55 namespace content { 57 namespace content {
56 58
57 struct GpuProcessTransportFactory::PerCompositorData { 59 struct GpuProcessTransportFactory::PerCompositorData {
58 int surface_id; 60 int surface_id;
59 scoped_refptr<ReflectorImpl> reflector; 61 scoped_refptr<ReflectorImpl> reflector;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ui::Compositor* compositor) { 93 ui::Compositor* compositor) {
92 #if defined(OS_WIN) 94 #if defined(OS_WIN)
93 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin( 95 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin(
94 compositor)); 96 compositor));
95 #elif defined(USE_OZONE) 97 #elif defined(USE_OZONE)
96 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone( 98 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone(
97 compositor)); 99 compositor));
98 #elif defined(USE_X11) 100 #elif defined(USE_X11)
99 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11( 101 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceX11(
100 compositor)); 102 compositor));
103 #elif defined(OS_MACOSX)
104 return scoped_ptr<cc::SoftwareOutputDevice>(
105 new SoftwareOutputDeviceMac(compositor));
101 #else 106 #else
102 NOTREACHED(); 107 NOTREACHED();
103 return scoped_ptr<cc::SoftwareOutputDevice>(); 108 return scoped_ptr<cc::SoftwareOutputDevice>();
104 #endif 109 #endif
105 } 110 }
106 111
107 scoped_ptr<cc::OverlayCandidateValidator> CreateOverlayCandidateValidator( 112 scoped_ptr<cc::OverlayCandidateValidator> CreateOverlayCandidateValidator(
108 gfx::AcceleratedWidget widget) { 113 gfx::AcceleratedWidget widget) {
109 #if defined(USE_OZONE) 114 #if defined(USE_OZONE)
110 gfx::OverlayCandidatesOzone* overlay_candidates = 115 gfx::OverlayCandidatesOzone* overlay_candidates =
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 378 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
374 observer_list_, 379 observer_list_,
375 OnLostResources()); 380 OnLostResources());
376 381
377 // Kill things that use the shared context before killing the shared context. 382 // Kill things that use the shared context before killing the shared context.
378 lost_gl_helper.reset(); 383 lost_gl_helper.reset();
379 lost_shared_main_thread_contexts = NULL; 384 lost_shared_main_thread_contexts = NULL;
380 } 385 }
381 386
382 } // namespace content 387 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698