| OLD | NEW | 
|    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/drm/gpu/gbm_buffer.h" |    5 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h" | 
|    6  |    6  | 
|    7 #include <drm.h> |    7 #include <drm.h> | 
|    8 #include <fcntl.h> |    8 #include <fcntl.h> | 
|    9 #include <gbm.h> |    9 #include <gbm.h> | 
|   10 #include <xf86drm.h> |   10 #include <xf86drm.h> | 
|   11 #include <utility> |   11 #include <utility> | 
|   12  |   12  | 
|   13 #include "base/logging.h" |   13 #include "base/logging.h" | 
|   14 #include "base/posix/eintr_wrapper.h" |   14 #include "base/posix/eintr_wrapper.h" | 
|   15 #include "base/trace_event/trace_event.h" |   15 #include "base/trace_event/trace_event.h" | 
|   16 #include "ui/gfx/geometry/size_conversions.h" |   16 #include "ui/gfx/geometry/size_conversions.h" | 
|   17 #include "ui/gfx/native_pixmap_handle_ozone.h" |   17 #include "ui/gfx/native_pixmap_handle_ozone.h" | 
|   18 #include "ui/ozone/platform/drm/common/drm_util.h" |   18 #include "ui/ozone/platform/drm/common/drm_util.h" | 
|   19 #include "ui/ozone/platform/drm/gpu/drm_window.h" |   19 #include "ui/ozone/platform/drm/gpu/drm_window.h" | 
|   20 #include "ui/ozone/platform/drm/gpu/gbm_device.h" |   20 #include "ui/ozone/platform/drm/gpu/gbm_device.h" | 
|   21 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" |   21 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" | 
|   22 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" |   22 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" | 
|   23 #include "ui/ozone/public/ozone_platform.h"  // nogncheck |   23 #include "ui/ozone/public/ozone_platform.h" | 
|   24 #include "ui/ozone/public/surface_factory_ozone.h" |   24 #include "ui/ozone/public/surface_factory_ozone.h" | 
|   25  |   25  | 
|   26 namespace ui { |   26 namespace ui { | 
|   27  |   27  | 
|   28 GbmBuffer::GbmBuffer(const scoped_refptr<GbmDevice>& gbm, |   28 GbmBuffer::GbmBuffer(const scoped_refptr<GbmDevice>& gbm, | 
|   29                      gbm_bo* bo, |   29                      gbm_bo* bo, | 
|   30                      gfx::BufferFormat format, |   30                      gfx::BufferFormat format, | 
|   31                      gfx::BufferUsage usage) |   31                      gfx::BufferUsage usage) | 
|   32     : GbmBufferBase(gbm, bo, format, usage), format_(format), usage_(usage) {} |   32     : GbmBufferBase(gbm, bo, format, usage), format_(format), usage_(usage) {} | 
|   33  |   33  | 
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  170   DCHECK(!processing_callback_.is_null()); |  170   DCHECK(!processing_callback_.is_null()); | 
|  171   if (!processing_callback_.Run(this, processed_pixmap_)) { |  171   if (!processing_callback_.Run(this, processed_pixmap_)) { | 
|  172     LOG(ERROR) << "Failed processing NativePixmap"; |  172     LOG(ERROR) << "Failed processing NativePixmap"; | 
|  173     return nullptr; |  173     return nullptr; | 
|  174   } |  174   } | 
|  175  |  175  | 
|  176   return processed_pixmap_->buffer(); |  176   return processed_pixmap_->buffer(); | 
|  177 } |  177 } | 
|  178  |  178  | 
|  179 }  // namespace ui |  179 }  // namespace ui | 
| OLD | NEW |