diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index dcd81437f9..9975281793 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -237,8 +237,8 @@ void UIContext::FillRect(const UI::Drawable &drawable, const Bounds &bounds) { } } -void UIContext::FillRectVGradient(uint32_t color1, uint32_t color2, const Bounds &bounds) { - uidrawbuffer_->DrawImageStretchVGradient(theme->whiteImage, bounds.x, bounds.y, bounds.x2(), bounds.y2(), color1, color2); +void UIContext::DrawImageVGradient(ImageID image, uint32_t color1, uint32_t color2, const Bounds &bounds) { + uidrawbuffer_->DrawImageStretchVGradient(image, bounds.x, bounds.y, bounds.x2(), bounds.y2(), color1, color2); } void UIContext::PushTransform(const UITransform &transform) { diff --git a/Common/UI/Context.h b/Common/UI/Context.h index cac554fabe..944d31e4d8 100644 --- a/Common/UI/Context.h +++ b/Common/UI/Context.h @@ -85,7 +85,7 @@ public: void DrawTextShadow(const char *str, float x, float y, uint32_t color, int align = 0); void DrawTextRect(const char *str, const Bounds &bounds, uint32_t color, int align = 0); void FillRect(const UI::Drawable &drawable, const Bounds &bounds); - void FillRectVGradient(uint32_t color1, uint32_t color2, const Bounds &bounds); + void DrawImageVGradient(ImageID image, uint32_t color1, uint32_t color2, const Bounds &bounds); // in dps, like dp_xres and dp_yres void SetBounds(const Bounds &b) { bounds_ = b; } diff --git a/UI/GPUDriverTestScreen.cpp b/UI/GPUDriverTestScreen.cpp index 610d44297e..2ea83cb63c 100644 --- a/UI/GPUDriverTestScreen.cpp +++ b/UI/GPUDriverTestScreen.cpp @@ -543,17 +543,17 @@ void GPUDriverTestScreen::ShaderTest() { y += 100; dc.Begin(); - dc.DrawText("Flat shading", x, y, 0xFFFFFFFF, FLAG_DYNAMIC_ASCII); + dc.DrawText("Flat shaded tex", x, y, 0xFFFFFFFF, FLAG_DYNAMIC_ASCII); dc.DrawText("(TEST OK if no gradient!)", x + 400, y, 0xFFFFFFFF, ALIGN_LEFT); dc.Flush(); - bounds = { x + 200, y, testW, 70 }; + bounds = { x + 200, y, 100, 100 }; // Draw rectangle that should be flat shaded dc.BeginPipeline(flatShadingPipeline_, samplerNearest_); // There is a "provoking vertex" difference here between GL and Vulkan when using flat shading. One gets one color, one gets the other. // Wherever possible we should reconfigure the GL provoking vertex to match Vulkan, probably. - dc.FillRectVGradient(bgColorOK, textColorOK, bounds); + dc.DrawImageVGradient(ImageID("I_ICON"), 0xFFFFFFFF, 0x808080FF, bounds); dc.Flush(); } diff --git a/ffmpeg b/ffmpeg index 0b28335ace..4738685f4a 160000 --- a/ffmpeg +++ b/ffmpeg @@ -1 +1 @@ -Subproject commit 0b28335acea4f429ae798c5e75232e54881bf164 +Subproject commit 4738685f4ac27c1775a238d1e602f399627b5e6f