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

Side by Side Diff: ui/compositor/compositor.h

Issue 93593002: Fall back to software mode if Aura can't create a GL context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wire up fallback from Compositor::CreateOutputSurface to ContextFactory::CreateOutputSurface Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Sets the global instance. Caller keeps ownership. 80 // Sets the global instance. Caller keeps ownership.
81 // If this function isn't called (for tests), a "default" factory will be 81 // If this function isn't called (for tests), a "default" factory will be
82 // created on the first call of GetInstance. 82 // created on the first call of GetInstance.
83 static void SetInstance(ContextFactory* instance); 83 static void SetInstance(ContextFactory* instance);
84 84
85 // Creates an output surface for the given compositor. The factory may keep 85 // Creates an output surface for the given compositor. The factory may keep
86 // per-compositor data (e.g. a shared context), that needs to be cleaned up 86 // per-compositor data (e.g. a shared context), that needs to be cleaned up
87 // by calling RemoveCompositor when the compositor gets destroyed. 87 // by calling RemoveCompositor when the compositor gets destroyed.
88 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( 88 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
89 Compositor* compositor) = 0; 89 Compositor* compositor, bool software_fallback) = 0;
90 90
91 // Creates a reflector that copies the content of the |mirrored_compositor| 91 // Creates a reflector that copies the content of the |mirrored_compositor|
92 // onto |mirroing_layer|. 92 // onto |mirroing_layer|.
93 virtual scoped_refptr<Reflector> CreateReflector( 93 virtual scoped_refptr<Reflector> CreateReflector(
94 Compositor* mirrored_compositor, 94 Compositor* mirrored_compositor,
95 Layer* mirroring_layer) = 0; 95 Layer* mirroring_layer) = 0;
96 // Removes the reflector, which stops the mirroring. 96 // Removes the reflector, which stops the mirroring.
97 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) = 0; 97 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) = 0;
98 98
99 // Returns a reference to the offscreen context provider used by the 99 // Returns a reference to the offscreen context provider used by the
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 bool draw_on_compositing_end_; 388 bool draw_on_compositing_end_;
389 389
390 base::WeakPtrFactory<Compositor> schedule_draw_factory_; 390 base::WeakPtrFactory<Compositor> schedule_draw_factory_;
391 391
392 DISALLOW_COPY_AND_ASSIGN(Compositor); 392 DISALLOW_COPY_AND_ASSIGN(Compositor);
393 }; 393 };
394 394
395 } // namespace ui 395 } // namespace ui
396 396
397 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 397 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698