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

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/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
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 int GetDmaBufFd() const override { return -1; } 74 int GetDmaBufFd() const override { return -1; }
75 int GetDmaBufPitch() const override { return 0; } 75 int GetDmaBufPitch() const override { return 0; }
76 gfx::BufferFormat GetBufferFormat() const override { return format_; } 76 gfx::BufferFormat GetBufferFormat() const override { return format_; }
77 gfx::Size GetBufferSize() const override { return gfx::Size(); }
77 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 78 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
78 int plane_z_order, 79 int plane_z_order,
79 gfx::OverlayTransform plane_transform, 80 gfx::OverlayTransform plane_transform,
80 const gfx::Rect& display_bounds, 81 const gfx::Rect& display_bounds,
81 const gfx::RectF& crop_rect) override { 82 const gfx::RectF& crop_rect) override {
82 return true; 83 return true;
83 } 84 }
84 void SetProcessingCallback( 85 void SetProcessingCallback(
85 const ProcessingCallback& processing_callback) override {} 86 const ProcessingCallback& processing_callback) override {}
86 scoped_refptr<NativePixmap> GetProcessedPixmap( 87 scoped_refptr<NativePixmap> GetProcessedPixmap(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap( 127 scoped_refptr<NativePixmap> HeadlessSurfaceFactory::CreateNativePixmap(
127 gfx::AcceleratedWidget widget, 128 gfx::AcceleratedWidget widget,
128 gfx::Size size, 129 gfx::Size size,
129 gfx::BufferFormat format, 130 gfx::BufferFormat format,
130 gfx::BufferUsage usage) { 131 gfx::BufferUsage usage) {
131 return new TestPixmap(format); 132 return new TestPixmap(format);
132 } 133 }
133 134
134 } // namespace ui 135 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698