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

Side by Side Diff: ui/ozone/platform/cast/gl_surface_cast.h

Issue 2723583003: Convert Ozone cast to use GLOzone API. (Closed)
Patch Set: . Created 3 years, 9 months 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
« no previous file with comments | « ui/ozone/platform/cast/gl_ozone_egl_cast.cc ('k') | ui/ozone/platform/cast/gl_surface_cast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_ 5 #ifndef UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
6 #define UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_ 6 #define UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gfx/overlay_transform.h" 11 #include "ui/gfx/overlay_transform.h"
12 #include "ui/gfx/swap_result.h" 12 #include "ui/gfx/swap_result.h"
13 #include "ui/gl/gl_image.h" 13 #include "ui/gl/gl_image.h"
14 #include "ui/gl/gl_surface_egl.h" 14 #include "ui/gl/gl_surface_egl.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 class SurfaceFactoryCast; 18 class GLOzoneEglCast;
19 19
20 class GLSurfaceCast : public gl::NativeViewGLSurfaceEGL { 20 class GLSurfaceCast : public gl::NativeViewGLSurfaceEGL {
21 public: 21 public:
22 GLSurfaceCast(gfx::AcceleratedWidget widget, SurfaceFactoryCast* parent); 22 GLSurfaceCast(gfx::AcceleratedWidget widget, GLOzoneEglCast* parent);
23 23
24 // gl::GLSurface: 24 // gl::GLSurface:
25 bool SupportsSwapBuffersWithBounds() override; 25 bool SupportsSwapBuffersWithBounds() override;
26 gfx::SwapResult SwapBuffers() override; 26 gfx::SwapResult SwapBuffers() override;
27 gfx::SwapResult SwapBuffersWithBounds( 27 gfx::SwapResult SwapBuffersWithBounds(
28 const std::vector<gfx::Rect>& rects) override; 28 const std::vector<gfx::Rect>& rects) override;
29 bool Resize(const gfx::Size& size, 29 bool Resize(const gfx::Size& size,
30 float scale_factor, 30 float scale_factor,
31 bool has_alpha) override; 31 bool has_alpha) override;
32 bool ScheduleOverlayPlane(int z_order, 32 bool ScheduleOverlayPlane(int z_order,
33 gfx::OverlayTransform transform, 33 gfx::OverlayTransform transform,
34 gl::GLImage* image, 34 gl::GLImage* image,
35 const gfx::Rect& bounds_rect, 35 const gfx::Rect& bounds_rect,
36 const gfx::RectF& crop_rect) override; 36 const gfx::RectF& crop_rect) override;
37 EGLConfig GetConfig() override; 37 EGLConfig GetConfig() override;
38 38
39 protected: 39 protected:
40 ~GLSurfaceCast() override; 40 ~GLSurfaceCast() override;
41 41
42 gfx::AcceleratedWidget widget_; 42 gfx::AcceleratedWidget widget_;
43 SurfaceFactoryCast* parent_; 43 GLOzoneEglCast* parent_;
44 bool supports_swap_buffer_with_bounds_; 44 bool supports_swap_buffer_with_bounds_;
45 45
46 private: 46 private:
47 DISALLOW_COPY_AND_ASSIGN(GLSurfaceCast); 47 DISALLOW_COPY_AND_ASSIGN(GLSurfaceCast);
48 }; 48 };
49 49
50 } // namespace ui 50 } // namespace ui
51 51
52 #endif // UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_ 52 #endif // UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/gl_ozone_egl_cast.cc ('k') | ui/ozone/platform/cast/gl_surface_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698