Reduced memory transfer of OpenGL gradient uniform upload. Rearranged gradient uniforms on OpenGL side to be more performant.

This commit is contained in:
shan 2022-10-05 16:07:43 -07:00
parent f7ce7244d0
commit 1eb8d972ba
7 changed files with 83 additions and 128 deletions

View file

@ -28,6 +28,7 @@ pub use stroke::{LineCap, LineDash, LineJoin, Stroke};
pub use text::Text;
use crate::{Backend, Primitive, Renderer};
pub use crate::gradient::Gradient;
use iced_native::layout::{self, Layout};
use iced_native::mouse;
@ -37,8 +38,6 @@ use iced_native::{
Clipboard, Element, Length, Point, Rectangle, Shell, Size, Vector, Widget,
};
pub use crate::gradient::Gradient;
use std::marker::PhantomData;
/// A widget capable of drawing 2D graphics.