Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 308193003: Removed QuadSink and MockQuadCuller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumLayerImpl
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | cc/layers/heads_up_display_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index a8553f2e755e30712bda25e29b32f7e22af01ff9..e11a278d692d85ad3d1cfde88982abd390a0def5 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -12,7 +12,6 @@
#include "cc/debug/frame_rate_counter.h"
#include "cc/debug/paint_time_counter.h"
#include "cc/debug/traced_value.h"
-#include "cc/layers/quad_sink.h"
#include "cc/output/renderer.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/resources/memory_history.h"
@@ -105,12 +104,15 @@ bool HeadsUpDisplayLayerImpl::WillDraw(DrawMode draw_mode,
return LayerImpl::WillDraw(draw_mode, resource_provider);
}
-void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink,
- AppendQuadsData* append_quads_data) {
+void HeadsUpDisplayLayerImpl::AppendQuads(
+ RenderPass* render_pass,
+ const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ AppendQuadsData* append_quads_data) {
if (!hud_resource_->id())
return;
- SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
+ SharedQuadState* shared_quad_state =
+ render_pass->CreateAndAppendSharedQuadState();
PopulateSharedQuadState(shared_quad_state);
gfx::Rect quad_rect(content_bounds());
@@ -133,7 +135,7 @@ void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink,
SK_ColorTRANSPARENT,
vertex_opacity,
flipped);
- quad_sink->Append(quad.PassAs<DrawQuad>());
+ render_pass->AppendDrawQuad(quad.PassAs<DrawQuad>());
}
void HeadsUpDisplayLayerImpl::UpdateHudTexture(
@@ -587,7 +589,7 @@ SkRect HeadsUpDisplayLayerImpl::DrawPaintTimeDisplay(
void HeadsUpDisplayLayerImpl::DrawDebugRect(
SkCanvas* canvas,
- SkPaint& paint,
+ SkPaint* paint,
const DebugRect& rect,
SkColor stroke_color,
SkColor fill_color,
@@ -596,14 +598,14 @@ void HeadsUpDisplayLayerImpl::DrawDebugRect(
gfx::Rect debug_layer_rect = gfx::ScaleToEnclosingRect(
rect.rect, 1.0 / contents_scale_x(), 1.0 / contents_scale_y());
SkIRect sk_rect = RectToSkIRect(debug_layer_rect);
- paint.setColor(fill_color);
- paint.setStyle(SkPaint::kFill_Style);
- canvas->drawIRect(sk_rect, paint);
+ paint->setColor(fill_color);
+ paint->setStyle(SkPaint::kFill_Style);
+ canvas->drawIRect(sk_rect, *paint);
- paint.setColor(stroke_color);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(SkFloatToScalar(stroke_width));
- canvas->drawIRect(sk_rect, paint);
+ paint->setColor(stroke_color);
+ paint->setStyle(SkPaint::kStroke_Style);
+ paint->setStrokeWidth(SkFloatToScalar(stroke_width));
+ canvas->drawIRect(sk_rect, *paint);
if (label_text.length()) {
const int kFontHeight = 12;
@@ -723,7 +725,7 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects(
}
DrawDebugRect(canvas,
- paint,
+ &paint,
debug_rects[i],
stroke_color,
fill_color,
@@ -739,7 +741,7 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects(
fade_step_--;
for (size_t i = 0; i < paint_rects_.size(); ++i) {
DrawDebugRect(canvas,
- paint,
+ &paint,
paint_rects_[i],
DebugColors::PaintRectBorderColor(fade_step_),
DebugColors::PaintRectFillColor(fade_step_),
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | cc/layers/heads_up_display_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698