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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 1486773002: Add NativeViewGLSurfaceEGL::CommitOverlayPlanes support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cop-bare-implementation
Patch Set: typo Created 5 years, 1 month 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
« ui/gl/gl_surface_egl.cc ('K') | « ui/gl/gl_surface_overlay.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_ozone.cc
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index 459ec7231a1919e0ea9f4fb2a47ba99f727209f4..b2dc8df466f5bf830247d2a2606ea883d19be6ff 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -19,6 +19,7 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/gl_surface_osmesa.h"
+#include "ui/gl/gl_surface_overlay.h"
#include "ui/gl/gl_surface_stub.h"
#include "ui/gl/scoped_binders.h"
#include "ui/gl/scoped_make_current.h"
@@ -164,29 +165,13 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
const SwapCompletionCallback& callback) override;
protected:
- struct Overlay {
- Overlay(int z_order,
- OverlayTransform transform,
- GLImage* image,
- const Rect& bounds_rect,
- const RectF& crop_rect);
-
- bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget) const;
-
- int z_order;
- OverlayTransform transform;
- scoped_refptr<GLImage> image;
- Rect bounds_rect;
- RectF crop_rect;
- };
-
struct PendingFrame {
PendingFrame();
bool ScheduleOverlayPlanes(gfx::AcceleratedWidget widget);
bool ready;
- std::vector<Overlay> overlays;
+ std::vector<GLSurfaceOverlay> overlays;
SwapCompletionCallback callback;
};
@@ -214,23 +199,6 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneSurfaceless);
};
-GLSurfaceOzoneSurfaceless::Overlay::Overlay(int z_order,
- OverlayTransform transform,
- GLImage* image,
- const Rect& bounds_rect,
- const RectF& crop_rect)
- : z_order(z_order),
- transform(transform),
- image(image),
- bounds_rect(bounds_rect),
- crop_rect(crop_rect) {}
-
-bool GLSurfaceOzoneSurfaceless::Overlay::ScheduleOverlayPlane(
- gfx::AcceleratedWidget widget) const {
- return image->ScheduleOverlayPlane(widget, z_order, transform, bounds_rect,
- crop_rect);
-}
-
GLSurfaceOzoneSurfaceless::PendingFrame::PendingFrame() : ready(false) {}
bool GLSurfaceOzoneSurfaceless::PendingFrame::ScheduleOverlayPlanes(
@@ -301,7 +269,7 @@ bool GLSurfaceOzoneSurfaceless::ScheduleOverlayPlane(int z_order,
const Rect& bounds_rect,
const RectF& crop_rect) {
unsubmitted_frames_.back()->overlays.push_back(
- Overlay(z_order, transform, image, bounds_rect, crop_rect));
+ GLSurfaceOverlay(z_order, transform, image, bounds_rect, crop_rect));
return true;
}
« ui/gl/gl_surface_egl.cc ('K') | « ui/gl/gl_surface_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698