Skip to content
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

Port intermediate blits to brush_image, remove another ps_hw_composite case. #2510

Merged
merged 3 commits into from Mar 14, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Port intermediate blits to brush_image, remove another ps_hw_composit…

…e case.
  • Loading branch information
gw3583 committed Mar 14, 2018
commit 2992772318aad1a1bb6ba64624f66ccf9275fb79
@@ -1169,25 +1169,32 @@ impl AlphaBatchBuilder {
batch.push(PrimitiveInstance::from(instance));
}
PictureCompositeMode::Blit => {
let src_task_address = render_tasks.get_task_address(source_id);
let key = BatchKey::new(
BatchKind::HardwareComposite,
BlendMode::PremultipliedAlpha,
BatchTextures::render_target_cache(),
let kind = BatchKind::Brush(
BrushBatchKind::Image(ImageBufferKind::Texture2DArray)
);
let key = BatchKey::new(kind, non_segmented_blend_mode, textures);
let batch = self.batch_list.get_suitable_batch(key, &task_relative_bounding_rect);
let item_bounding_rect = prim_metadata.screen_rect.expect("bug!!").clipped;
let instance = CompositePrimitiveInstance::new(
task_address,
src_task_address,
RenderTaskAddress(0),
item_bounding_rect.origin.x,
item_bounding_rect.origin.y,
z,
item_bounding_rect.size.width,
item_bounding_rect.size.height,
);

let uv_rect_address = render_tasks[cache_task_id]
.get_texture_handle()
.as_int(gpu_cache);

let instance = BrushInstance {
picture_address: task_address,
prim_address: prim_cache_address,
clip_chain_rect_index,
scroll_id,
clip_task_address,
z,
segment_index: 0,
edge_flags: EdgeAaSegmentMask::empty(),
brush_flags: BrushFlags::empty(),
user_data: [
uv_rect_address,
BrushImageSourceKind::Color as i32,
RasterizationSpace::Screen as i32,
],
};
batch.push(PrimitiveInstance::from(instance));
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.