GtkCssImageSurface: add cache for the last drawn size.
Keep a copy of the scaled image to speed up rendering multiple times the image at the same size.
This commit is contained in:
		 Juan Pablo Ugarte
					Juan Pablo Ugarte
				
			
				
					committed by
					
						 Juan Pablo Ugarte
						Juan Pablo Ugarte
					
				
			
			
				
	
			
			
			 Juan Pablo Ugarte
						Juan Pablo Ugarte
					
				
			
						parent
						
							8ed4b48b4c
						
					
				
				
					commit
					2a8e1745cf
				
			| @ -39,6 +39,9 @@ struct _GtkCssImageSurface | ||||
|   GtkCssImage parent; | ||||
|  | ||||
|   cairo_surface_t *surface;             /* the surface we render - guaranteed to be an image surface */ | ||||
|   cairo_surface_t *cache;               /* the scaled surface - to avoid scaling every time we need to draw */ | ||||
|   double width;                         /* original cache width */ | ||||
|   double height;                        /* original cache height */ | ||||
| }; | ||||
|  | ||||
| struct _GtkCssImageSurfaceClass | ||||
|  | ||||
		Reference in New Issue
	
	Block a user