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

Unified Diff: ui/ozone/platform/dri/gbm_surface_factory.cc

Issue 445163003: With the overlay path moving back to passing AcceleratedWidgets, move the implementation back into … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused comment Created 6 years, 4 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/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/gbm_surfaceless.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc
index 7e5dc34a11c5fcd0765149acef1210419a7f8390..6e63d7fbf22661daec7364c4bb6b1a37397e3cc7 100644
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc
@@ -13,6 +13,7 @@
#include "ui/ozone/platform/dri/gbm_surfaceless.h"
#include "ui/ozone/platform/dri/screen_manager.h"
#include "ui/ozone/public/native_pixmap.h"
+#include "ui/ozone/public/overlay_candidates_ozone.h"
dnicoara 2014/08/07 14:26:04 Is this needed?
achaulk 2014/08/07 14:26:49 Oh, no that's part of a later patch
#include "ui/ozone/public/surface_ozone_egl.h"
namespace ui {
@@ -123,6 +124,32 @@ scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
return scoped_refptr<GbmPixmap>(new GbmPixmap(buffer));
}
+bool GbmSurfaceFactory::ScheduleOverlayPlane(
+ gfx::AcceleratedWidget w,
dnicoara 2014/08/07 14:26:04 nit: Could you rename this to the longer form: wid
achaulk 2014/08/07 14:26:49 Sure
+ int plane_z_order,
+ gfx::OverlayTransform plane_transform,
+ scoped_refptr<NativePixmap> buffer,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect) {
+ scoped_refptr<GbmPixmap> pixmap = static_cast<GbmPixmap*>(buffer.get());
+ if (!pixmap) {
+ LOG(ERROR) << "ScheduleOverlayPlane passed NULL buffer.";
+ return false;
+ }
+ base::WeakPtr<HardwareDisplayController> hdc =
+ screen_manager_->GetDisplayController(w);
+ if (!hdc) {
+ LOG(ERROR) << "Unknown AcceleratedWidget";
+ return false;
+ }
+ hdc->QueueOverlayPlane(OverlayPlane(pixmap->buffer(),
+ plane_z_order,
+ plane_transform,
+ display_bounds,
+ crop_rect));
+ return true;
+}
+
bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
return allow_surfaceless_;
}
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.h ('k') | ui/ozone/platform/dri/gbm_surfaceless.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698