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

Unified Diff: gpu/ipc/service/direct_composition_surface_win.cc

Issue 2849743002: Allow binding multiple textures to one DC Layer overlay. (Closed)
Patch Set: put texture id array in ScheduleDCLayer Created 3 years, 8 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
Index: gpu/ipc/service/direct_composition_surface_win.cc
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc
index 3174151bbbb00d709c528f5e32ca79bf0de5a40e..93b7bd056d8afc041f0a74adfdec373c42a69e55 100644
--- a/gpu/ipc/service/direct_composition_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -347,7 +347,7 @@ bool DCLayerTree::SwapChainPresenter::ShouldBeYUY2() {
void DCLayerTree::SwapChainPresenter::PresentToSwapChain(
const ui::DCRendererLayerParams& params) {
gl::GLImageDXGI* image_dxgi =
- gl::GLImageDXGI::FromGLImage(params.image.get());
+ gl::GLImageDXGI::FromGLImage(params.image[0].get());
DCHECK(image_dxgi);
// Swap chain size is the minimum of the on-screen size and the source
@@ -731,7 +731,8 @@ bool DCLayerTree::CommitAndClearPendingOverlays() {
// Add an overlay with z-order 0 representing the main plane.
gfx::Size surface_size = surface_->GetSize();
pending_overlays_.push_back(base::MakeUnique<ui::DCRendererLayerParams>(
- false, gfx::Rect(), 0, gfx::Transform(), nullptr,
+ false, gfx::Rect(), 0, gfx::Transform(),
+ std::vector<scoped_refptr<gl::GLImage>>(),
gfx::RectF(gfx::SizeF(surface_size)), gfx::Rect(surface_size), 0, 0, 1.0,
0));
@@ -760,10 +761,10 @@ bool DCLayerTree::CommitAndClearPendingOverlays() {
VisualInfo* visual_info = &visual_info_[i];
InitVisual(i);
- if (params.image &&
- params.image->GetType() == gl::GLImage::Type::DXGI_IMAGE) {
+ if (params.image.size() > 0 && params.image[0] &&
+ params.image[0]->GetType() == gl::GLImage::Type::DXGI_IMAGE) {
UpdateVisualForVideo(visual_info, params);
- } else if (!params.image) {
+ } else if (params.image.empty()) {
UpdateVisualForBackbuffer(visual_info, params);
} else {
CHECK(false);

Powered by Google App Engine
This is Rietveld 408576698