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

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

Issue 148003006: Use gpu::Mailbox instead of std:string in IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed typo 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
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager.h ('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 22 matching lines...) Expand all
33 class Layer; 33 class Layer;
34 class LayerTreeDebugState; 34 class LayerTreeDebugState;
35 class LayerTreeHost; 35 class LayerTreeHost;
36 } 36 }
37 37
38 namespace gfx { 38 namespace gfx {
39 class Rect; 39 class Rect;
40 class Size; 40 class Size;
41 } 41 }
42 42
43 namespace gpu {
44 struct Mailbox;
45 }
46
43 namespace ui { 47 namespace ui {
44 48
45 class Compositor; 49 class Compositor;
46 class CompositorVSyncManager; 50 class CompositorVSyncManager;
47 class Layer; 51 class Layer;
48 class PostedSwapQueue; 52 class PostedSwapQueue;
49 class Reflector; 53 class Reflector;
50 class Texture; 54 class Texture;
51 struct LatencyInfo; 55 struct LatencyInfo;
52 56
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 public: 109 public:
106 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); 110 Texture(bool flipped, const gfx::Size& size, float device_scale_factor);
107 111
108 bool flipped() const { return flipped_; } 112 bool flipped() const { return flipped_; }
109 gfx::Size size() const { return size_; } 113 gfx::Size size() const { return size_; }
110 float device_scale_factor() const { return device_scale_factor_; } 114 float device_scale_factor() const { return device_scale_factor_; }
111 115
112 virtual unsigned int PrepareTexture() = 0; 116 virtual unsigned int PrepareTexture() = 0;
113 117
114 // Replaces the texture with the texture from the specified mailbox. 118 // Replaces the texture with the texture from the specified mailbox.
115 virtual void Consume(const std::string& mailbox_name, 119 virtual void Consume(const gpu::Mailbox& mailbox,
116 const gfx::Size& new_size) {} 120 const gfx::Size& new_size) {}
117 121
118 // Moves the texture into the mailbox and returns the mailbox name. 122 // Moves the texture into the mailbox and returns the mailbox name.
119 // The texture must have been previously consumed from a mailbox. 123 // The texture must have been previously consumed from a mailbox.
120 virtual std::string Produce(); 124 virtual gpu::Mailbox Produce();
121 125
122 protected: 126 protected:
123 virtual ~Texture(); 127 virtual ~Texture();
124 gfx::Size size_; // in pixel 128 gfx::Size size_; // in pixel
125 129
126 private: 130 private:
127 friend class base::RefCounted<Texture>; 131 friend class base::RefCounted<Texture>;
128 132
129 bool flipped_; 133 bool flipped_;
130 float device_scale_factor_; 134 float device_scale_factor_;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 bool draw_on_compositing_end_; 333 bool draw_on_compositing_end_;
330 334
331 base::WeakPtrFactory<Compositor> schedule_draw_factory_; 335 base::WeakPtrFactory<Compositor> schedule_draw_factory_;
332 336
333 DISALLOW_COPY_AND_ASSIGN(Compositor); 337 DISALLOW_COPY_AND_ASSIGN(Compositor);
334 }; 338 };
335 339
336 } // namespace ui 340 } // namespace ui
337 341
338 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 342 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698