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

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

Issue 9297041: Merge Compositor and CompositorCC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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_GFX_COMPOSITOR_LAYER_H_ 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_
6 #define UI_GFX_COMPOSITOR_LAYER_H_ 6 #define UI_GFX_COMPOSITOR_LAYER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void set_name(const std::string& name) { name_ = name; } 156 void set_name(const std::string& name) { name_ = name; }
157 157
158 const ui::Texture* texture() const { return texture_.get(); } 158 const ui::Texture* texture() const { return texture_.get(); }
159 159
160 // Assigns a new external texture. |texture| can be NULL to disable external 160 // Assigns a new external texture. |texture| can be NULL to disable external
161 // updates. 161 // updates.
162 // TODO(beng): This can be removed from the API when we are in a 162 // TODO(beng): This can be removed from the API when we are in a
163 // single-compositor world. 163 // single-compositor world.
164 void SetExternalTexture(ui::Texture* texture); 164 void SetExternalTexture(ui::Texture* texture);
165 165
166 // Resets the canvas of the texture.
167 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin);
168
169 // Adds |invalid_rect| to the Layer's pending invalid rect and calls 166 // Adds |invalid_rect| to the Layer's pending invalid rect and calls
170 // ScheduleDraw(). 167 // ScheduleDraw().
171 void SchedulePaint(const gfx::Rect& invalid_rect); 168 void SchedulePaint(const gfx::Rect& invalid_rect);
172 169
173 // Schedules a redraw of the layer tree at the compositor. 170 // Schedules a redraw of the layer tree at the compositor.
174 void ScheduleDraw(); 171 void ScheduleDraw();
175 172
176 // Sometimes the Layer is being updated by something other than SetCanvas 173 // Sometimes the Layer is being updated by something other than SetCanvas
177 // (e.g. the GPU process on UI_COMPOSITOR_IMAGE_TRANSPORT). 174 // (e.g. the GPU process on UI_COMPOSITOR_IMAGE_TRANSPORT).
178 bool layer_updated_externally() const { return layer_updated_externally_; } 175 bool layer_updated_externally() const { return layer_updated_externally_; }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 WebKit::WebLayer web_layer_; 267 WebKit::WebLayer web_layer_;
271 bool web_layer_is_accelerated_; 268 bool web_layer_is_accelerated_;
272 bool show_debug_borders_; 269 bool show_debug_borders_;
273 270
274 DISALLOW_COPY_AND_ASSIGN(Layer); 271 DISALLOW_COPY_AND_ASSIGN(Layer);
275 }; 272 };
276 273
277 } // namespace ui 274 } // namespace ui
278 275
279 #endif // UI_GFX_COMPOSITOR_LAYER_H_ 276 #endif // UI_GFX_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698