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; } | |
80 gfx::BufferFormat GetBufferFormat() const override { return format_; } | 79 gfx::BufferFormat GetBufferFormat() const override { return format_; } |
81 gfx::Size GetBufferSize() const override { return gfx::Size(); } | 80 gfx::Size GetBufferSize() const override { return gfx::Size(); } |
82 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 81 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
83 int plane_z_order, | 82 int plane_z_order, |
84 gfx::OverlayTransform plane_transform, | 83 gfx::OverlayTransform plane_transform, |
85 const gfx::Rect& display_bounds, | 84 const gfx::Rect& display_bounds, |
86 const gfx::RectF& crop_rect) override { | 85 const gfx::RectF& crop_rect) override { |
87 return true; | 86 return true; |
88 } | 87 } |
89 void SetProcessingCallback( | 88 void SetProcessingCallback( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 124 |
126 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( | 125 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( |
127 gfx::AcceleratedWidget widget, | 126 gfx::AcceleratedWidget widget, |
128 gfx::Size size, | 127 gfx::Size size, |
129 gfx::BufferFormat format, | 128 gfx::BufferFormat format, |
130 gfx::BufferUsage usage) { | 129 gfx::BufferUsage usage) { |
131 return new TestPixmap(format); | 130 return new TestPixmap(format); |
132 } | 131 } |
133 | 132 |
134 } // namespace ui | 133 } // namespace ui |
OLD | NEW |