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

Unified Diff: ui/ozone/platform/cast/gl_surface_cast.h

Issue 2179163003: Convert Ozone cast to directly create GLSurfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to PBuffer. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/cast/cast.gypi ('k') | ui/ozone/platform/cast/gl_surface_cast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/cast/gl_surface_cast.h
diff --git a/ui/ozone/platform/cast/gl_surface_cast.h b/ui/ozone/platform/cast/gl_surface_cast.h
new file mode 100644
index 0000000000000000000000000000000000000000..036f6797181929246403c2aaa0112bc59bda5977
--- /dev/null
+++ b/ui/ozone/platform/cast/gl_surface_cast.h
@@ -0,0 +1,48 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
+#define UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
+
+#include "base/macros.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/overlay_transform.h"
+#include "ui/gfx/swap_result.h"
+#include "ui/gl/gl_image.h"
+#include "ui/gl/gl_surface_egl.h"
+
+namespace ui {
+
+class SurfaceFactoryCast;
+
+class GLSurfaceCast : public gl::NativeViewGLSurfaceEGL {
+ public:
+ GLSurfaceCast(gfx::AcceleratedWidget widget, SurfaceFactoryCast* parent);
+
+ // gl::GLSurface:
+ gfx::SwapResult SwapBuffers() override;
+ bool Resize(const gfx::Size& size,
+ float scale_factor,
+ bool has_alpha) override;
+ bool ScheduleOverlayPlane(int z_order,
+ gfx::OverlayTransform transform,
+ gl::GLImage* image,
+ const gfx::Rect& bounds_rect,
+ const gfx::RectF& crop_rect) override;
+ EGLConfig GetConfig() override;
+
+ protected:
+ ~GLSurfaceCast() override;
+
+ gfx::AcceleratedWidget widget_;
+ SurfaceFactoryCast* parent_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GLSurfaceCast);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_CAST_GL_SURFACE_CAST_H_
« no previous file with comments | « ui/ozone/platform/cast/cast.gypi ('k') | ui/ozone/platform/cast/gl_surface_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698