2014-09-26 23:48:19 +00:00
|
|
|
diff --git compositor/io_surface_layer_mac.mm compositor/io_surface_layer_mac.mm
|
2014-10-10 17:54:35 +00:00
|
|
|
index 357c65e..371e3c4 100644
|
2014-09-26 23:48:19 +00:00
|
|
|
--- compositor/io_surface_layer_mac.mm
|
|
|
|
+++ compositor/io_surface_layer_mac.mm
|
2014-10-10 17:54:35 +00:00
|
|
|
@@ -295,7 +295,7 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
|
|
|
TRACE_EVENT0("browser", "IOSurfaceLayer::drawInCGLContext");
|
|
|
|
|
|
|
|
if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) {
|
2014-02-05 20:35:45 +00:00
|
|
|
- glClearColor(1, 1, 1, 1);
|
|
|
|
+ glClearColor(0, 0, 0, 0);
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
2014-10-10 17:54:35 +00:00
|
|
|
return;
|
2014-02-05 20:35:45 +00:00
|
|
|
}
|
2014-09-26 23:48:19 +00:00
|
|
|
diff --git renderer_host/compositing_iosurface_mac.mm renderer_host/compositing_iosurface_mac.mm
|
|
|
|
index ba67fc9..2c6a410 100644
|
|
|
|
--- renderer_host/compositing_iosurface_mac.mm
|
|
|
|
+++ renderer_host/compositing_iosurface_mac.mm
|
|
|
|
@@ -168,7 +168,7 @@ bool CompositingIOSurfaceMac::DrawIOSurface(
|
2014-09-04 17:53:40 +00:00
|
|
|
CHECK_AND_SAVE_GL_ERROR();
|
2014-01-07 18:54:06 +00:00
|
|
|
} else {
|
|
|
|
// Should match the clear color of RenderWidgetHostViewMac.
|
|
|
|
- glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
|
|
|
+ glClearColor(0, 0, 0, 0);
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
|
}
|
|
|
|
|
2014-09-26 23:48:19 +00:00
|
|
|
diff --git renderer_host/render_widget_host_view_aura.cc renderer_host/render_widget_host_view_aura.cc
|
2014-10-10 17:54:35 +00:00
|
|
|
index 6ad6e41..9f33679 100644
|
2014-09-26 23:48:19 +00:00
|
|
|
--- renderer_host/render_widget_host_view_aura.cc
|
|
|
|
+++ renderer_host/render_widget_host_view_aura.cc
|
2014-10-10 17:54:35 +00:00
|
|
|
@@ -1706,8 +1706,14 @@ void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) {
|
2014-05-29 17:15:34 +00:00
|
|
|
// For non-opaque windows, we don't draw anything, since we depend on the
|
|
|
|
// canvas coming from the compositor to already be initialized as
|
|
|
|
// transparent.
|
|
|
|
- if (window_->layer()->fills_bounds_opaquely())
|
|
|
|
- canvas->DrawColor(SK_ColorWHITE);
|
|
|
|
+ if (window_->layer()->fills_bounds_opaquely()) {
|
|
|
|
+ if (host_->IsRenderView()) {
|
|
|
|
+ canvas->DrawColor(GetContentClient()->browser()->GetBaseBackgroundColor(
|
|
|
|
+ RenderViewHost::From(host_)));
|
|
|
|
+ } else {
|
|
|
|
+ canvas->DrawColor(SK_ColorWHITE);
|
2014-04-15 19:02:30 +00:00
|
|
|
+ }
|
2014-05-29 17:15:34 +00:00
|
|
|
+ }
|
2014-04-08 19:33:48 +00:00
|
|
|
}
|
|
|
|
|
2014-05-29 17:15:34 +00:00
|
|
|
void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged(
|
2014-09-26 23:48:19 +00:00
|
|
|
diff --git renderer_host/render_widget_host_view_mac.mm renderer_host/render_widget_host_view_mac.mm
|
|
|
|
index 0d4d03c..8615203 100644
|
|
|
|
--- renderer_host/render_widget_host_view_mac.mm
|
|
|
|
+++ renderer_host/render_widget_host_view_mac.mm
|
|
|
|
@@ -541,7 +541,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
|
2014-09-04 17:53:40 +00:00
|
|
|
// draw.
|
2014-06-12 20:28:58 +00:00
|
|
|
background_layer_.reset([[CALayer alloc] init]);
|
|
|
|
[background_layer_
|
|
|
|
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
|
|
|
+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
|
|
|
[cocoa_view_ setLayer:background_layer_];
|
2014-09-04 17:53:40 +00:00
|
|
|
[cocoa_view_ setWantsLayer:YES];
|
|
|
|
|