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/threading/worker_pool.h" | 10 #include "base/threading/worker_pool.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 TestPixmap(gfx::BufferFormat format) : format_(format) {} | 69 TestPixmap(gfx::BufferFormat format) : format_(format) {} |
70 | 70 |
71 void* GetEGLClientBuffer() const override { return nullptr; } | 71 void* GetEGLClientBuffer() const override { return nullptr; } |
72 int GetDmaBufFd() const override { return -1; } | 72 int GetDmaBufFd() const override { return -1; } |
73 int GetDmaBufPitch() const override { return 0; } | 73 int GetDmaBufPitch() const override { return 0; } |
74 gfx::BufferFormat GetBufferFormat() const override { return format_; } | 74 gfx::BufferFormat GetBufferFormat() const override { return format_; } |
75 gfx::Size GetBufferSize() const override { return gfx::Size(); } | 75 gfx::Size GetBufferSize() const override { return gfx::Size(); } |
76 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 76 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
77 int plane_z_order, | 77 int plane_z_order, |
78 gfx::OverlayTransform plane_transform, | 78 gfx::OverlayTransform plane_transform, |
| 79 gfx::BufferFormat storage_format, |
79 const gfx::Rect& display_bounds, | 80 const gfx::Rect& display_bounds, |
80 const gfx::RectF& crop_rect) override { | 81 const gfx::RectF& crop_rect, |
| 82 bool handle_scaling) override { |
81 return true; | 83 return true; |
82 } | 84 } |
83 void SetProcessingCallback( | 85 void SetProcessingCallback( |
84 const ProcessingCallback& processing_callback) override {} | 86 const ProcessingCallback& processing_callback) override {} |
85 scoped_refptr<NativePixmap> GetProcessedPixmap( | 87 scoped_refptr<NativePixmap> GetProcessedPixmap( |
86 gfx::Size target_size, | 88 gfx::Size target_size, |
87 gfx::BufferFormat target_format) override { | 89 gfx::BufferFormat target_format) override { |
88 return nullptr; | 90 return nullptr; |
89 } | 91 } |
90 gfx::NativePixmapHandle ExportHandle() override { | 92 gfx::NativePixmapHandle ExportHandle() override { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 126 |
125 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( | 127 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( |
126 gfx::AcceleratedWidget widget, | 128 gfx::AcceleratedWidget widget, |
127 gfx::Size size, | 129 gfx::Size size, |
128 gfx::BufferFormat format, | 130 gfx::BufferFormat format, |
129 gfx::BufferUsage usage) { | 131 gfx::BufferUsage usage) { |
130 return new TestPixmap(format); | 132 return new TestPixmap(format); |
131 } | 133 } |
132 | 134 |
133 } // namespace ui | 135 } // namespace ui |
OLD | NEW |