Skip to content

Commit 5f8001f

Browse files
committed
don't overwrite cull rect when finishing recording
1 parent a026493 commit 5f8001f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl Context2D{
263263

264264
// transfer the picture contents to the canvas in a single operation, applying the blend
265265
// mode to the whole canvas (regardless of the bounds of the text/path being drawn)
266-
if let Some(pict) = layer_recorder.finish_recording_as_picture(Some(&self.bounds)){
266+
if let Some(pict) = layer_recorder.finish_recording_as_picture(None){
267267
self.with_canvas(|canvas| {
268268
canvas.save();
269269
canvas.set_matrix(&Matrix::new_identity().into());

src/image.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ pub fn set_data<'a>(mut cx: FunctionContext<'a>) -> NeonResult<Handle<'a, JsBool
219219
let mut compositor = PictureRecorder::new();
220220
dom.set_container_size(bounds.size());
221221
dom.render(compositor.begin_recording(bounds, None));
222-
if let Some(picture) = compositor.finish_recording_as_picture(Some(&bounds)){
223-
this.content = Content::Vector(picture);
224-
}
222+
this.content = match compositor.finish_recording_as_picture(None){
223+
Some(picture) => Content::Vector(picture),
224+
None => Content::Broken
225+
};
225226
}else{
226227
this.content = Content::Broken
227228
}

0 commit comments

Comments
 (0)