New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalidate drop-shadow data when local rect is animating. #2799
Changes from all commits
File filter...
Jump to…
Invalidate drop-shadow data when local rect is animating.
If the local rect of the content of a drop-shadow is changing each frame, we also need to invalidate the GPU cache data for the drop-shadow primitive. Unfortunately we don't have a way in wrench right now to create a regression test for this. Fixes #2721.
- Loading branch information
| @@ -467,6 +467,14 @@ impl PicturePrimitive { | ||
| pic_state.tasks.push(render_task_id); | ||
| self.surface = Some(PictureSurface::RenderTask(render_task_id)); | ||
|
|
||
| // If the local rect of the contents changed, force the cache handle | ||
| // to be invalidated so that the primitive data below will get | ||
| // uploaded to the GPU this frame. This can occur during property | ||
| // animation. | ||
| if pic_state.local_rect_changed { | ||
gw3583
Author
Collaborator
|
||
| frame_state.gpu_cache.invalidate(&mut self.extra_gpu_data_handle); | ||
| } | ||
|
|
||
| if let Some(mut request) = frame_state.gpu_cache.request(&mut self.extra_gpu_data_handle) { | ||
| // TODO(gw): This is very hacky code below! It stores an extra | ||
| // brush primitive below for the special case of a | ||
| @@ -2473,6 +2473,7 @@ impl PrimitiveStore { | ||
| if new_local_rect != metadata.local_rect { | ||
| metadata.local_rect = new_local_rect; | ||
| frame_state.gpu_cache.invalidate(&mut metadata.gpu_location); | ||
| pic_state.local_rect_changed = true; | ||
kvark
Member
|
||
| } | ||
| } | ||
| } | ||
when is it ever reset to
false?