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

Side by Side Diff: ui/ozone/platform/dri/gbm_surface.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: 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
« no previous file with comments | « ui/ozone/platform/dri/dri_surface.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.h » ('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 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.h" 5 #include "ui/ozone/platform/dri/gbm_surface.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/ozone/platform/dri/dri_buffer.h" 10 #include "ui/ozone/platform/dri/dri_buffer.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 GbmSurfaceBuffer::GetBuffer(pending_buffer); 128 GbmSurfaceBuffer::GetBuffer(pending_buffer);
129 if (!primary) { 129 if (!primary) {
130 primary = GbmSurfaceBuffer::CreateBuffer(dri_, pending_buffer); 130 primary = GbmSurfaceBuffer::CreateBuffer(dri_, pending_buffer);
131 if (!primary) { 131 if (!primary) {
132 LOG(ERROR) << "Failed to associate the buffer with the controller"; 132 LOG(ERROR) << "Failed to associate the buffer with the controller";
133 return false; 133 return false;
134 } 134 }
135 } 135 }
136 136
137 // The primary buffer is a special case. 137 // The primary buffer is a special case.
138 queued_planes_.push_back(OverlayPlane(primary)); 138 controller_->QueueOverlayPlane(OverlayPlane(primary));
139 139
140 if (!GbmSurfaceless::OnSwapBuffers()) 140 if (!GbmSurfaceless::OnSwapBuffers())
141 return false; 141 return false;
142 142
143 // If there was a frontbuffer, it is no longer active. Release it back to GBM. 143 // If there was a frontbuffer, it is no longer active. Release it back to GBM.
144 if (current_buffer_) 144 if (current_buffer_)
145 gbm_surface_release_buffer(native_surface_, current_buffer_); 145 gbm_surface_release_buffer(native_surface_, current_buffer_);
146 146
147 current_buffer_ = pending_buffer; 147 current_buffer_ = pending_buffer;
148 return true; 148 return true;
149 } 149 }
150 150
151 } // namespace ui 151 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface.cc ('k') | ui/ozone/platform/dri/gbm_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698