Index: cc/output/direct_renderer.cc |
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc |
index c077ffe21ae3c16d1409c1e11cb794ede263360d..3df00624d65e8d7e787d83630634a280029bdc3c 100644 |
--- a/cc/output/direct_renderer.cc |
+++ b/cc/output/direct_renderer.cc |
@@ -10,9 +10,11 @@ |
#include "base/containers/hash_tables.h" |
#include "base/containers/scoped_ptr_hash_map.h" |
#include "base/debug/trace_event.h" |
+#include "base/debug/stack_trace.h" |
#include "base/metrics/histogram.h" |
#include "cc/base/math_util.h" |
#include "cc/output/copy_output_request.h" |
+#include "cc/output/overlay_renderer.h" |
#include "cc/quads/draw_quad.h" |
#include "ui/gfx/rect_conversions.h" |
#include "ui/gfx/transform.h" |
@@ -132,7 +134,10 @@ DirectRenderer::DirectRenderer(RendererClient* client, |
ResourceProvider* resource_provider) |
: Renderer(client, settings), |
output_surface_(output_surface), |
- resource_provider_(resource_provider) {} |
+ resource_provider_(resource_provider) { |
+ overlay_renderer_.reset(new OverlayRenderer()); |
+ overlay_renderer_->Initialize(); |
+} |
DirectRenderer::~DirectRenderer() {} |
@@ -203,6 +208,8 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
UMA_HISTOGRAM_COUNTS("Renderer4.renderPassCount", |
render_passes_in_draw_order->size()); |
+ overlay_renderer_->ProcessForOverlays(render_passes_in_draw_order); |
+ |
const RenderPass* root_render_pass = render_passes_in_draw_order->back(); |
DCHECK(root_render_pass); |
@@ -229,6 +236,9 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
BeginDrawingFrame(&frame); |
for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) { |
RenderPass* pass = render_passes_in_draw_order->at(i); |
+ if (!pass->should_render) { |
+ continue; |
+ } |
DrawRenderPass(&frame, pass, allow_partial_swap); |
for (ScopedPtrVector<CopyOutputRequest>::iterator it = |
@@ -244,8 +254,6 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
} |
} |
FinishDrawingFrame(&frame); |
- |
- render_passes_in_draw_order->clear(); |
} |
gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass( |