OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/headless/headless_surface_factory.h" | 5 #include "ui/ozone/platform/headless/headless_surface_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 class TestPixmap : public ui::NativePixmap { | 69 class TestPixmap : public ui::NativePixmap { |
70 public: | 70 public: |
71 TestPixmap(gfx::BufferFormat format) : format_(format) {} | 71 TestPixmap(gfx::BufferFormat format) : format_(format) {} |
72 | 72 |
73 void* GetEGLClientBuffer() const override { return nullptr; } | 73 void* GetEGLClientBuffer() const override { return nullptr; } |
74 bool AreDmaBufFdsValid() const override { return false; } | 74 bool AreDmaBufFdsValid() const override { return false; } |
75 size_t GetDmaBufFdCount() const override { return 0; } | 75 size_t GetDmaBufFdCount() const override { return 0; } |
76 int GetDmaBufFd(size_t plane) const override { return -1; } | 76 int GetDmaBufFd(size_t plane) const override { return -1; } |
77 int GetDmaBufPitch(size_t plane) const override { return 0; } | 77 int GetDmaBufPitch(size_t plane) const override { return 0; } |
78 int GetDmaBufOffset(size_t plane) const override { return 0; } | 78 int GetDmaBufOffset(size_t plane) const override { return 0; } |
| 79 uint64_t GetDmaBufModifier(size_t plane) const override { return 0; } |
79 gfx::BufferFormat GetBufferFormat() const override { return format_; } | 80 gfx::BufferFormat GetBufferFormat() const override { return format_; } |
80 gfx::Size GetBufferSize() const override { return gfx::Size(); } | 81 gfx::Size GetBufferSize() const override { return gfx::Size(); } |
81 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 82 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
82 int plane_z_order, | 83 int plane_z_order, |
83 gfx::OverlayTransform plane_transform, | 84 gfx::OverlayTransform plane_transform, |
84 const gfx::Rect& display_bounds, | 85 const gfx::Rect& display_bounds, |
85 const gfx::RectF& crop_rect) override { | 86 const gfx::RectF& crop_rect) override { |
86 return true; | 87 return true; |
87 } | 88 } |
88 void SetProcessingCallback( | 89 void SetProcessingCallback( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 125 |
125 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( | 126 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( |
126 gfx::AcceleratedWidget widget, | 127 gfx::AcceleratedWidget widget, |
127 gfx::Size size, | 128 gfx::Size size, |
128 gfx::BufferFormat format, | 129 gfx::BufferFormat format, |
129 gfx::BufferUsage usage) { | 130 gfx::BufferUsage usage) { |
130 return new TestPixmap(format); | 131 return new TestPixmap(format); |
131 } | 132 } |
132 | 133 |
133 } // namespace ui | 134 } // namespace ui |
OLD | NEW |