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

Side by Side Diff: ui/ozone/platform/headless/headless_surface_factory.cc

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 }; 65 };
66 66
67 class TestPixmap : public ui::NativePixmap { 67 class TestPixmap : public ui::NativePixmap {
68 public: 68 public:
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 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 76 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
76 int plane_z_order, 77 int plane_z_order,
77 gfx::OverlayTransform plane_transform, 78 gfx::OverlayTransform plane_transform,
78 const gfx::Rect& display_bounds, 79 const gfx::Rect& display_bounds,
79 const gfx::RectF& crop_rect) override { 80 const gfx::RectF& crop_rect) override {
80 return true; 81 return true;
81 } 82 }
82 void SetProcessingCallback( 83 void SetProcessingCallback(
83 const ProcessingCallback& processing_callback) override {} 84 const ProcessingCallback& processing_callback) override {}
84 scoped_refptr<NativePixmap> GetProcessedPixmap( 85 scoped_refptr<NativePixmap> GetProcessedPixmap(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 124
124 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( 125 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap(
125 gfx::AcceleratedWidget widget, 126 gfx::AcceleratedWidget widget,
126 gfx::Size size, 127 gfx::Size size,
127 gfx::BufferFormat format, 128 gfx::BufferFormat format,
128 gfx::BufferUsage usage) { 129 gfx::BufferUsage usage) {
129 return new TestPixmap(format); 130 return new TestPixmap(format);
130 } 131 }
131 132
132 } // namespace ui 133 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698