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

Side by Side Diff: trunk/src/ui/ozone/platform/dri/gbm_surface_factory.cc

Issue 447073004: Revert 288137 "With the overlay path moving back to passing Acce..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ui/ozone/platform/dri/gbm_surface_factory.h" 5 #include "ui/ozone/platform/dri/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "third_party/khronos/EGL/egl.h" 10 #include "third_party/khronos/EGL/egl.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 gfx::Size size, 116 gfx::Size size,
117 BufferFormat format) { 117 BufferFormat format) {
118 scoped_refptr<GbmBuffer> buffer = GbmBuffer::CreateBuffer( 118 scoped_refptr<GbmBuffer> buffer = GbmBuffer::CreateBuffer(
119 drm_, device_, format, size, true); 119 drm_, device_, format, size, true);
120 if (!buffer) 120 if (!buffer)
121 return NULL; 121 return NULL;
122 122
123 return scoped_refptr<GbmPixmap>(new GbmPixmap(buffer)); 123 return scoped_refptr<GbmPixmap>(new GbmPixmap(buffer));
124 } 124 }
125 125
126 bool GbmSurfaceFactory::ScheduleOverlayPlane(
127 gfx::AcceleratedWidget widget,
128 int plane_z_order,
129 gfx::OverlayTransform plane_transform,
130 scoped_refptr<NativePixmap> buffer,
131 const gfx::Rect& display_bounds,
132 const gfx::RectF& crop_rect) {
133 scoped_refptr<GbmPixmap> pixmap = static_cast<GbmPixmap*>(buffer.get());
134 if (!pixmap) {
135 LOG(ERROR) << "ScheduleOverlayPlane passed NULL buffer.";
136 return false;
137 }
138 base::WeakPtr<HardwareDisplayController> hdc =
139 screen_manager_->GetDisplayController(widget);
140 if (!hdc)
141 return true;
142 hdc->QueueOverlayPlane(OverlayPlane(pixmap->buffer(),
143 plane_z_order,
144 plane_transform,
145 display_bounds,
146 crop_rect));
147 return true;
148 }
149
150 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() { 126 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
151 return allow_surfaceless_; 127 return allow_surfaceless_;
152 } 128 }
153 129
154 } // namespace ui 130 } // namespace ui
OLDNEW
« no previous file with comments | « trunk/src/ui/ozone/platform/dri/gbm_surface_factory.h ('k') | trunk/src/ui/ozone/platform/dri/gbm_surfaceless.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698