mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows/macOS: Fix incorrect clear of buffer during software rendering (issue #2197)
This commit is contained in:
22
patch/patches/software_renderer_729363.patch
Normal file
22
patch/patches/software_renderer_729363.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git cc/output/software_renderer.cc cc/output/software_renderer.cc
|
||||
index 34eda97..6fc30a0 100644
|
||||
--- cc/output/software_renderer.cc
|
||||
+++ cc/output/software_renderer.cc
|
||||
@@ -152,7 +152,16 @@ void SoftwareRenderer::SetClipRect(const gfx::Rect& rect) {
|
||||
void SoftwareRenderer::ClearCanvas(SkColor color) {
|
||||
if (!current_canvas_)
|
||||
return;
|
||||
- current_canvas_->clear(color);
|
||||
+
|
||||
+ if (is_scissor_enabled_) {
|
||||
+ // The same paint used by SkCanvas::clear, but applied to the scissor rect.
|
||||
+ SkPaint clear_paint;
|
||||
+ clear_paint.setColor(color);
|
||||
+ clear_paint.setBlendMode(SkBlendMode::kSrc);
|
||||
+ current_canvas_->drawRect(gfx::RectToSkRect(scissor_rect_), clear_paint);
|
||||
+ } else {
|
||||
+ current_canvas_->clear(color);
|
||||
+ }
|
||||
}
|
||||
|
||||
void SoftwareRenderer::ClearFramebuffer() {
|
Reference in New Issue
Block a user