| OLD | NEW |
| 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_GL_GL_IMAGE_H_ | 5 #ifndef UI_GL_GL_IMAGE_H_ |
| 6 #define UI_GL_GL_IMAGE_H_ | 6 #define UI_GL_GL_IMAGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // return false. | 55 // return false. |
| 56 virtual bool CopyTexImage(unsigned target) = 0; | 56 virtual bool CopyTexImage(unsigned target) = 0; |
| 57 | 57 |
| 58 // Copy |rect| of image to |offset| in texture currently bound to |target|. | 58 // Copy |rect| of image to |offset| in texture currently bound to |target|. |
| 59 // Returns true on success. It is valid for an implementation to always | 59 // Returns true on success. It is valid for an implementation to always |
| 60 // return false. | 60 // return false. |
| 61 virtual bool CopyTexSubImage(unsigned target, | 61 virtual bool CopyTexSubImage(unsigned target, |
| 62 const gfx::Point& offset, | 62 const gfx::Point& offset, |
| 63 const gfx::Rect& rect) = 0; | 63 const gfx::Rect& rect) = 0; |
| 64 | 64 |
| 65 // Copy |rect| of image to |offset| in texture with |texture_id|. |
| 66 // Returns true on success. Unlike above functions, this doesn't require |
| 67 // the destination texture to be bound to a target and fences provide more |
| 68 // efficient synchronization. |
| 69 virtual bool CopySubImageData(unsigned texture_id, |
| 70 const gfx::Point& offset, |
| 71 const gfx::Rect& rect, |
| 72 GLFence* in_fence, |
| 73 GLFence* out_fence) = 0; |
| 74 |
| 65 // Schedule image as an overlay plane to be shown at swap time for |widget|. | 75 // Schedule image as an overlay plane to be shown at swap time for |widget|. |
| 66 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 76 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 67 int z_order, | 77 int z_order, |
| 68 gfx::OverlayTransform transform, | 78 gfx::OverlayTransform transform, |
| 69 const gfx::Rect& bounds_rect, | 79 const gfx::Rect& bounds_rect, |
| 70 const gfx::RectF& crop_rect) = 0; | 80 const gfx::RectF& crop_rect) = 0; |
| 71 | 81 |
| 72 // Flush any preceding rendering for the image. | 82 // Flush any preceding rendering for the image. |
| 73 virtual void Flush() = 0; | 83 virtual void Flush() = 0; |
| 74 | 84 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 101 | 111 |
| 102 private: | 112 private: |
| 103 friend class base::RefCounted<GLImage>; | 113 friend class base::RefCounted<GLImage>; |
| 104 | 114 |
| 105 DISALLOW_COPY_AND_ASSIGN(GLImage); | 115 DISALLOW_COPY_AND_ASSIGN(GLImage); |
| 106 }; | 116 }; |
| 107 | 117 |
| 108 } // namespace gl | 118 } // namespace gl |
| 109 | 119 |
| 110 #endif // UI_GL_GL_IMAGE_H_ | 120 #endif // UI_GL_GL_IMAGE_H_ |
| OLD | NEW |