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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 12221077: Fixing tile grid size used by cc:Picture to make it respect current tile configuration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rolling skia to 7896 Created 7 years, 10 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') | no next file » | 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 113ac5a3dafbf67c2d3a1d865dbf09814f154360..efbd4c3f76fd3dd33bd23d41b5afc7943abcea99 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -4,19 +4,29 @@
#include "cc/test/fake_content_layer_client.h"
-#include "ui/gfx/rect.h"
+#include "third_party/skia/include/core/SkCanvas.h"
namespace cc {
FakeContentLayerClient::FakeContentLayerClient()
- : m_paintAllOpaque(false)
-{
+ : paint_all_opaque_(false) {
}
-void FakeContentLayerClient::paintContents(SkCanvas*, const gfx::Rect& rect, gfx::RectF& opaqueRect)
-{
- if (m_paintAllOpaque)
- opaqueRect = rect;
+FakeContentLayerClient::~FakeContentLayerClient() {
+}
+
+void FakeContentLayerClient::paintContents(SkCanvas* canvas,
+ const gfx::Rect& rect, gfx::RectF& opaque_rect) {
+ if (paint_all_opaque_)
+ opaque_rect = rect;
+
+ SkPaint paint;
+ for (RectVector::const_iterator rect_it = draw_rects_.begin();
+ rect_it < draw_rects_.end(); rect_it++) {
+ SkRect draw_rect = SkRect::MakeXYWH(rect_it->x(), rect_it->y(),
+ rect_it->width(), rect_it->height());
+ canvas->drawRect(draw_rect, paint);
+ }
}
} // namespace cc
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698