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

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

Issue 148243013: Add shared bitmap managers for browser and renderer processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
26 namespace base { 26 namespace base {
27 class MessageLoopProxy; 27 class MessageLoopProxy;
28 class RunLoop; 28 class RunLoop;
29 } 29 }
30 30
31 namespace cc { 31 namespace cc {
32 class ContextProvider; 32 class ContextProvider;
33 class Layer; 33 class Layer;
34 class LayerTreeDebugState; 34 class LayerTreeDebugState;
35 class LayerTreeHost; 35 class LayerTreeHost;
36 class SharedBitmapManager;
36 } 37 }
37 38
38 namespace gfx { 39 namespace gfx {
39 class Rect; 40 class Rect;
40 class Size; 41 class Size;
41 } 42 }
42 43
43 namespace ui { 44 namespace ui {
44 45
45 class Compositor; 46 class Compositor;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 : NON_EXPORTED_BASE(public cc::LayerTreeHostClient), 167 : NON_EXPORTED_BASE(public cc::LayerTreeHostClient),
167 NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) { 168 NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) {
168 public: 169 public:
169 explicit Compositor(gfx::AcceleratedWidget widget); 170 explicit Compositor(gfx::AcceleratedWidget widget);
170 virtual ~Compositor(); 171 virtual ~Compositor();
171 172
172 static void Initialize(); 173 static void Initialize();
173 static bool WasInitializedWithThread(); 174 static bool WasInitializedWithThread();
174 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop(); 175 static scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop();
175 static void Terminate(); 176 static void Terminate();
177 static void SetSharedBitmapManager(cc::SharedBitmapManager* manager);
176 178
177 // Schedules a redraw of the layer tree associated with this compositor. 179 // Schedules a redraw of the layer tree associated with this compositor.
178 void ScheduleDraw(); 180 void ScheduleDraw();
179 181
180 // Sets the root of the layer tree drawn by this Compositor. The root layer 182 // Sets the root of the layer tree drawn by this Compositor. The root layer
181 // must have no parent. The compositor's root layer is reset if the root layer 183 // must have no parent. The compositor's root layer is reset if the root layer
182 // is destroyed. NULL can be passed to reset the root layer, in which case the 184 // is destroyed. NULL can be passed to reset the root layer, in which case the
183 // compositor will stop drawing anything. 185 // compositor will stop drawing anything.
184 // The Compositor does not own the root layer. 186 // The Compositor does not own the root layer.
185 const Layer* root_layer() const { return root_layer_; } 187 const Layer* root_layer() const { return root_layer_; }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 bool draw_on_compositing_end_; 331 bool draw_on_compositing_end_;
330 332
331 base::WeakPtrFactory<Compositor> schedule_draw_factory_; 333 base::WeakPtrFactory<Compositor> schedule_draw_factory_;
332 334
333 DISALLOW_COPY_AND_ASSIGN(Compositor); 335 DISALLOW_COPY_AND_ASSIGN(Compositor);
334 }; 336 };
335 337
336 } // namespace ui 338 } // namespace ui
337 339
338 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 340 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698