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

Side by Side Diff: ui/ozone/platform/dri/gbm_buffer.cc

Issue 371813004: ozone: gbm: Add overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test build Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/dri/gbm_buffer.h ('k') | ui/ozone/platform/dri/gbm_surface.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_buffer.h" 5 #include "ui/ozone/platform/dri/gbm_buffer.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_wrapper.h" 10 #include "ui/ozone/platform/dri/dri_wrapper.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 kColorDepth, 72 kColorDepth,
73 kPixelDepth, 73 kPixelDepth,
74 gbm_bo_get_stride(bo_), 74 gbm_bo_get_stride(bo_),
75 handle_, 75 handle_,
76 &framebuffer_)) { 76 &framebuffer_)) {
77 return false; 77 return false;
78 } 78 }
79 return true; 79 return true;
80 } 80 }
81 81
82 void* GbmBuffer::GetEGLClientBuffer() { 82 bool GbmBuffer::Initialize() {
83 return bo_; 83 return bo_ != NULL;
84 } 84 }
85 85
86 int GbmBuffer::GetDmaBufFd() { 86 uint32_t GbmBuffer::GetFramebufferId() const {
87 return framebuffer_;
88 }
89
90 uint32_t GbmBuffer::GetHandle() const {
91 return handle_;
92 }
93
94 gfx::Size GbmBuffer::Size() const {
95 return size_;
96 }
97
98 void GbmBuffer::PreSwapBuffers() {
99 }
100
101 void GbmBuffer::SwapBuffers() {
102 }
103
104 GbmPixmap::GbmPixmap(gbm_device* device, DriWrapper* dri, const gfx::Size& size)
105 : buffer_(device, dri, size) {
106 }
107
108 GbmPixmap::~GbmPixmap() {
109 }
110
111 void* GbmPixmap::GetEGLClientBuffer() {
112 return buffer_.bo();
113 }
114
115 int GbmPixmap::GetDmaBufFd() {
87 return -1; 116 return -1;
88 } 117 }
89 118
90 } // namespace ui 119 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_buffer.h ('k') | ui/ozone/platform/dri/gbm_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698