Chromium Code Reviews| Index: ui/gfx/compositor/compositor.h |
| diff --git a/ui/gfx/compositor/compositor.h b/ui/gfx/compositor/compositor.h |
| index 9343975561b76ffd8293399931233de6233cd176..35f57b29e81f6f2daa90475715f42ce2c485fd4a 100644 |
| --- a/ui/gfx/compositor/compositor.h |
| +++ b/ui/gfx/compositor/compositor.h |
| @@ -129,7 +129,8 @@ class COMPOSITOR_EXPORT Compositor : public base::RefCounted<Compositor> { |
| void Draw(bool force_clear); |
| // Reads the contents of the last rendered frame into the given bitmap. |
| - virtual void ReadPixels(SkBitmap* bitmap) = 0; |
| + // Returns false if the pixels could not be read. |
| + virtual bool ReadPixels(SkBitmap* bitmap) = 0; |
| // Notifies the compositor that the size of the widget that it is |
| // drawing to has changed. |
| @@ -175,6 +176,11 @@ class COMPOSITOR_EXPORT Compositor : public base::RefCounted<Compositor> { |
| CompositorDelegate* delegate() { return delegate_; } |
| + // When reading back pixel data the encoding is often wrong and needs to be |
| + // flipped vertically. |
| + void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels, |
|
jonathan.backer
2011/11/14 14:06:58
Please make this static.
|
| + const gfx::Size& image_size); |
| + |
| private: |
| // Notifies the compositor that compositing is about to start. See Draw() for |
| // notes about |force_clear|. |