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

Unified Diff: media/gpu/dxva_picture_buffer_win.h

Issue 2752143002: [dxvavda] Mark NV12 textures as allowing overlays. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/gpu/dxva_picture_buffer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_picture_buffer_win.h
diff --git a/media/gpu/dxva_picture_buffer_win.h b/media/gpu/dxva_picture_buffer_win.h
index ee4ce0c6c79c5590729c90679d1f41a800d196f4..29d502d1d09a9bbb6ec019ae723849a3b203dc27 100644
--- a/media/gpu/dxva_picture_buffer_win.h
+++ b/media/gpu/dxva_picture_buffer_win.h
@@ -61,6 +61,11 @@ class DXVAPictureBuffer {
color_space_ = color_space;
}
+ // Returns true if these could in theory be used as an overlay. May
+ // still be drawn using GL depending on the scene and precise hardware
+ // support.
+ virtual bool AllowOverlay() const = 0;
+
bool waiting_to_reuse() const { return state_ == WAITING_TO_REUSE; }
virtual gl::GLFence* reuse_fence();
@@ -102,6 +107,7 @@ class PbufferPictureBuffer : public DXVAPictureBuffer {
gl::GLFence* reuse_fence() override;
bool CopySurfaceComplete(IDirect3DSurface9* src_surface,
IDirect3DSurface9* dest_surface) override;
+ bool AllowOverlay() const override;
protected:
EGLSurface decoding_surface_;
@@ -144,6 +150,7 @@ class EGLStreamPictureBuffer : public DXVAPictureBuffer {
bool Initialize();
bool ReusePictureBuffer() override;
bool BindSampleToTexture(base::win::ScopedComPtr<IMFSample> sample) override;
+ bool AllowOverlay() const override;
private:
EGLStreamKHR stream_;
@@ -167,6 +174,7 @@ class EGLStreamCopyPictureBuffer : public DXVAPictureBuffer {
int input_buffer_id) override;
bool CopySurfaceComplete(IDirect3DSurface9* src_surface,
IDirect3DSurface9* dest_surface) override;
+ bool AllowOverlay() const override;
private:
EGLStreamKHR stream_;
« no previous file with comments | « no previous file | media/gpu/dxva_picture_buffer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698