| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SURFACE_OVERLAY_H_ | 5 #ifndef UI_GL_GL_SURFACE_OVERLAY_H_ | 
| 6 #define UI_GL_GL_SURFACE_OVERLAY_H_ | 6 #define UI_GL_GL_SURFACE_OVERLAY_H_ | 
| 7 | 7 | 
| 8 #include "base/macros.h" | 8 #include "base/macros.h" | 
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" | 
| 10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" | 
| 11 #include "ui/gfx/geometry/rect_f.h" | 11 #include "ui/gfx/geometry/rect_f.h" | 
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" | 
| 13 #include "ui/gfx/overlay_transform.h" | 13 #include "ui/gfx/overlay_transform.h" | 
| 14 #include "ui/gl/gl_image.h" | 14 #include "ui/gl/gl_image.h" | 
| 15 | 15 | 
| 16 namespace gfx { | 16 namespace gl { | 
| 17 | 17 | 
| 18 // For saving the properties of a GLImage overlay plane and scheduling it later. | 18 // For saving the properties of a GLImage overlay plane and scheduling it later. | 
| 19 class GLSurfaceOverlay { | 19 class GLSurfaceOverlay { | 
| 20  public: | 20  public: | 
| 21   GLSurfaceOverlay(int z_order, | 21   GLSurfaceOverlay(int z_order, | 
| 22                    OverlayTransform transform, | 22                    gfx::OverlayTransform transform, | 
| 23                    gl::GLImage* image, | 23                    gl::GLImage* image, | 
| 24                    const Rect& bounds_rect, | 24                    const gfx::Rect& bounds_rect, | 
| 25                    const RectF& crop_rect); | 25                    const gfx::RectF& crop_rect); | 
| 26   GLSurfaceOverlay(const GLSurfaceOverlay& other); | 26   GLSurfaceOverlay(const GLSurfaceOverlay& other); | 
| 27   ~GLSurfaceOverlay(); | 27   ~GLSurfaceOverlay(); | 
| 28 | 28 | 
| 29   // Schedule the image as an overlay plane to be shown at swap time for | 29   // Schedule the image as an overlay plane to be shown at swap time for | 
| 30   // |widget|. | 30   // |widget|. | 
| 31   bool ScheduleOverlayPlane(AcceleratedWidget widget) const; | 31   bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget) const; | 
| 32 | 32 | 
| 33  private: | 33  private: | 
| 34   int z_order_; | 34   int z_order_; | 
| 35   OverlayTransform transform_; | 35   gfx::OverlayTransform transform_; | 
| 36   scoped_refptr<gl::GLImage> image_; | 36   scoped_refptr<gl::GLImage> image_; | 
| 37   Rect bounds_rect_; | 37   gfx::Rect bounds_rect_; | 
| 38   RectF crop_rect_; | 38   gfx::RectF crop_rect_; | 
| 39 }; | 39 }; | 
| 40 | 40 | 
| 41 }  // namespace gfx | 41 }  // namespace gl | 
| 42 | 42 | 
| 43 #endif  // UI_GL_GL_SURFACE_OVERLAY_H_ | 43 #endif  // UI_GL_GL_SURFACE_OVERLAY_H_ | 
| OLD | NEW | 
|---|