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

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

Issue 8561016: Adds a bounds parameter to ui::Compositor::ReadPixels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer revision 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
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_GL_H_ 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 }; 95 };
96 96
97 class COMPOSITOR_EXPORT CompositorGL : public Compositor { 97 class COMPOSITOR_EXPORT CompositorGL : public Compositor {
98 public: 98 public:
99 CompositorGL(CompositorDelegate* delegate, 99 CompositorGL(CompositorDelegate* delegate,
100 gfx::AcceleratedWidget widget, 100 gfx::AcceleratedWidget widget,
101 const gfx::Size& size); 101 const gfx::Size& size);
102 virtual ~CompositorGL(); 102 virtual ~CompositorGL();
103 103
104 // Overridden from Compositor. 104 // Overridden from Compositor.
105 virtual bool ReadPixels(SkBitmap* bitmap) OVERRIDE; 105 virtual bool ReadPixels(SkBitmap* bitmap, const gfx::Rect& bounds) OVERRIDE;
106 106
107 void MakeCurrent(); 107 void MakeCurrent();
108 gfx::Size GetSize(); 108 gfx::Size GetSize();
109 109
110 protected: 110 protected:
111 virtual void OnWidgetSizeChanged() OVERRIDE; 111 virtual void OnWidgetSizeChanged() OVERRIDE;
112 112
113 private: 113 private:
114 // Overridden from Compositor. 114 // Overridden from Compositor.
115 virtual Texture* CreateTexture() OVERRIDE; 115 virtual Texture* CreateTexture() OVERRIDE;
116 virtual void OnNotifyStart(bool clear) OVERRIDE; 116 virtual void OnNotifyStart(bool clear) OVERRIDE;
117 virtual void OnNotifyEnd() OVERRIDE; 117 virtual void OnNotifyEnd() OVERRIDE;
118 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; 118 virtual void Blur(const gfx::Rect& bounds) OVERRIDE;
119 119
120 // The GL context used for compositing. 120 // The GL context used for compositing.
121 scoped_refptr<gfx::GLSurface> gl_surface_; 121 scoped_refptr<gfx::GLSurface> gl_surface_;
122 scoped_refptr<gfx::GLContext> gl_context_; 122 scoped_refptr<gfx::GLContext> gl_context_;
123 123
124 // Keep track of whether compositing has started or not. 124 // Keep track of whether compositing has started or not.
125 bool started_; 125 bool started_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(CompositorGL); 127 DISALLOW_COPY_AND_ASSIGN(CompositorGL);
128 }; 128 };
129 129
130 } // namespace ui 130 } // namespace ui
131 131
132 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ 132 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698