| OLD | NEW |
| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class COMPOSITOR_EXPORT CompositorGL : public Compositor { | 101 class COMPOSITOR_EXPORT CompositorGL : public Compositor { |
| 102 public: | 102 public: |
| 103 CompositorGL(CompositorDelegate* delegate, | 103 CompositorGL(CompositorDelegate* delegate, |
| 104 gfx::AcceleratedWidget widget, | 104 gfx::AcceleratedWidget widget, |
| 105 const gfx::Size& size); | 105 const gfx::Size& size); |
| 106 virtual ~CompositorGL(); | 106 virtual ~CompositorGL(); |
| 107 | 107 |
| 108 // Overridden from Compositor. | 108 // Overridden from Compositor. |
| 109 virtual void ReadPixels(SkBitmap* bitmap) OVERRIDE; | 109 virtual bool ReadPixels(SkBitmap* bitmap) OVERRIDE; |
| 110 | 110 |
| 111 void MakeCurrent(); | 111 void MakeCurrent(); |
| 112 gfx::Size GetSize(); | 112 gfx::Size GetSize(); |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 virtual void OnWidgetSizeChanged() OVERRIDE; | 115 virtual void OnWidgetSizeChanged() OVERRIDE; |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 // Overridden from Compositor. | 118 // Overridden from Compositor. |
| 119 virtual Texture* CreateTexture() OVERRIDE; | 119 virtual Texture* CreateTexture() OVERRIDE; |
| 120 virtual void OnNotifyStart(bool clear) OVERRIDE; | 120 virtual void OnNotifyStart(bool clear) OVERRIDE; |
| 121 virtual void OnNotifyEnd() OVERRIDE; | 121 virtual void OnNotifyEnd() OVERRIDE; |
| 122 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; | 122 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; |
| 123 | 123 |
| 124 // The GL context used for compositing. | 124 // The GL context used for compositing. |
| 125 scoped_refptr<gfx::GLSurface> gl_surface_; | 125 scoped_refptr<gfx::GLSurface> gl_surface_; |
| 126 scoped_refptr<gfx::GLContext> gl_context_; | 126 scoped_refptr<gfx::GLContext> gl_context_; |
| 127 | 127 |
| 128 // Keep track of whether compositing has started or not. | 128 // Keep track of whether compositing has started or not. |
| 129 bool started_; | 129 bool started_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(CompositorGL); | 131 DISALLOW_COPY_AND_ASSIGN(CompositorGL); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace ui | 134 } // namespace ui |
| 135 | 135 |
| 136 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 136 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
| OLD | NEW |