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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.cc

Issue 2678343011: chromeos: decode video into NV12 format instead of RGBA in vaapi decoder (Closed)
Patch Set: decide scanout in runtime Created 3 years, 5 months 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/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 bool AreDmaBufFdsValid() const override { return false; } 56 bool AreDmaBufFdsValid() const override { return false; }
57 size_t GetDmaBufFdCount() const override { return 0; } 57 size_t GetDmaBufFdCount() const override { return 0; }
58 int GetDmaBufFd(size_t plane) const override { return -1; } 58 int GetDmaBufFd(size_t plane) const override { return -1; }
59 int GetDmaBufPitch(size_t plane) const override { return 0; } 59 int GetDmaBufPitch(size_t plane) const override { return 0; }
60 int GetDmaBufOffset(size_t plane) const override { return 0; } 60 int GetDmaBufOffset(size_t plane) const override { return 0; }
61 uint64_t GetDmaBufModifier(size_t plane) const override { return 0; } 61 uint64_t GetDmaBufModifier(size_t plane) const override { return 0; }
62 gfx::BufferFormat GetBufferFormat() const override { 62 gfx::BufferFormat GetBufferFormat() const override {
63 return gfx::BufferFormat::BGRA_8888; 63 return gfx::BufferFormat::BGRA_8888;
64 } 64 }
65 gfx::BufferUsage GetBufferUsage() const override {
66 return gfx::BufferUsage::SCANOUT;
67 }
65 gfx::Size GetBufferSize() const override { return gfx::Size(); } 68 gfx::Size GetBufferSize() const override { return gfx::Size(); }
66 69
67 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 70 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
68 int plane_z_order, 71 int plane_z_order,
69 gfx::OverlayTransform plane_transform, 72 gfx::OverlayTransform plane_transform,
70 const gfx::Rect& display_bounds, 73 const gfx::Rect& display_bounds,
71 const gfx::RectF& crop_rect) override { 74 const gfx::RectF& crop_rect) override {
72 parent_->OnOverlayScheduled(display_bounds); 75 parent_->OnOverlayScheduled(display_bounds);
73 return true; 76 return true;
74 } 77 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 134
132 scoped_refptr<gfx::NativePixmap> SurfaceFactoryCast::CreateNativePixmap( 135 scoped_refptr<gfx::NativePixmap> SurfaceFactoryCast::CreateNativePixmap(
133 gfx::AcceleratedWidget widget, 136 gfx::AcceleratedWidget widget,
134 gfx::Size size, 137 gfx::Size size,
135 gfx::BufferFormat format, 138 gfx::BufferFormat format,
136 gfx::BufferUsage usage) { 139 gfx::BufferUsage usage) {
137 return make_scoped_refptr(new CastPixmap(egl_implementation_.get())); 140 return make_scoped_refptr(new CastPixmap(egl_implementation_.get()));
138 } 141 }
139 142
140 } // namespace ui 143 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698