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

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

Issue 1513283002: Add support to send optimal format as part of ScheduleOverlayPlane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update cmd_buffer_functions 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc ('k') | ui/ozone/public/native_pixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698