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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 14230007: cc: Do GatherPixelRefs from skia at record time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 7 years, 8 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/test/fake_content_layer_client.h ('k') | cc/test/fake_picture_pile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer_client.cc
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 715376646534bbf7c7b9e0d8532848b4f3ac0692..280459b3cd0441f71970073a5e8b2ed1b36dce0a 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -5,6 +5,7 @@
#include "cc/test/fake_content_layer_client.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "ui/gfx/skia_util.h"
namespace cc {
@@ -20,10 +21,11 @@ void FakeContentLayerClient::PaintContents(SkCanvas* canvas,
if (paint_all_opaque_)
*opaque_rect = rect;
+ canvas->clipRect(gfx::RectToSkRect(rect));
for (RectPaintVector::const_iterator it = draw_rects_.begin();
- it < draw_rects_.end(); ++it) {
+ it != draw_rects_.end(); ++it) {
gfx::Rect rect = it->first;
- SkPaint paint = it->second;
+ const SkPaint& paint = it->second;
SkRect draw_rect = SkRect::MakeXYWH(
rect.x(),
rect.y(),
@@ -31,6 +33,11 @@ void FakeContentLayerClient::PaintContents(SkCanvas* canvas,
rect.height());
canvas->drawRect(draw_rect, paint);
}
+
+ for (BitmapVector::const_iterator it = draw_bitmaps_.begin();
+ it != draw_bitmaps_.end(); ++it) {
+ canvas->drawBitmap(it->first, it->second.x(), it->second.y());
+ }
}
} // namespace cc
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698