cef/patch/patches/software_renderer_729363.patch

23 lines
784 B
Diff

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() {