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

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

Issue 8558033: Revert 110783 - Adds a bounds parameter to ui::Compositor::ReadPixels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | ui/gfx/compositor/compositor_cc.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COMPOSITOR_H_ 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // The Compositor does not own the root layer. 129 // The Compositor does not own the root layer.
130 const Layer* root_layer() const { return root_layer_; } 130 const Layer* root_layer() const { return root_layer_; }
131 Layer* root_layer() { return root_layer_; } 131 Layer* root_layer() { return root_layer_; }
132 void SetRootLayer(Layer* root_layer); 132 void SetRootLayer(Layer* root_layer);
133 133
134 // Draws the scene created by the layer tree and any visual effects. If 134 // Draws the scene created by the layer tree and any visual effects. If
135 // |force_clear| is true, this will cause the compositor to clear before 135 // |force_clear| is true, this will cause the compositor to clear before
136 // compositing. 136 // compositing.
137 void Draw(bool force_clear); 137 void Draw(bool force_clear);
138 138
139 // Reads the region |bounds| of the contents of the last rendered frame 139 // Reads the contents of the last rendered frame into the given bitmap.
140 // into the given bitmap.
141 // Returns false if the pixels could not be read. 140 // Returns false if the pixels could not be read.
142 virtual bool ReadPixels(SkBitmap* bitmap, const gfx::Rect& bounds) = 0; 141 virtual bool ReadPixels(SkBitmap* bitmap) = 0;
143 142
144 // Notifies the compositor that the size of the widget that it is 143 // Notifies the compositor that the size of the widget that it is
145 // drawing to has changed. 144 // drawing to has changed.
146 void WidgetSizeChanged(const gfx::Size& size) { 145 void WidgetSizeChanged(const gfx::Size& size) {
147 if (size.IsEmpty()) 146 if (size.IsEmpty())
148 return; 147 return;
149 size_ = size; 148 size_ = size;
150 OnWidgetSizeChanged(); 149 OnWidgetSizeChanged();
151 } 150 }
152 151
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // calls to it. 210 // calls to it.
212 static ui::Compositor*(*compositor_factory_)( 211 static ui::Compositor*(*compositor_factory_)(
213 ui::CompositorDelegate* delegate); 212 ui::CompositorDelegate* delegate);
214 213
215 friend class base::RefCounted<Compositor>; 214 friend class base::RefCounted<Compositor>;
216 }; 215 };
217 216
218 } // namespace ui 217 } // namespace ui
219 218
220 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ 219 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/compositor/compositor_cc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698