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

Unified Diff: cc/test/fake_content_layer_client.h

Issue 14205005: cc: Only consider layer clipped content rect for analysis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linker fixes on windows 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/resources/picture_pile_impl_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer_client.h
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index 462fa4732e475f42407cad9f0eec0132d3c147dc..e987b1169b49a3cb0a6b6fee2f9df2556db2e217 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -5,10 +5,12 @@
#ifndef CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
#define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
+#include <utility>
#include <vector>
#include "base/compiler_specific.h"
#include "cc/layers/content_layer_client.h"
+#include "third_party/skia/include/core/SkPaint.h"
#include "ui/gfx/rect.h"
namespace cc {
@@ -25,13 +27,15 @@ class FakeContentLayerClient : public cc::ContentLayerClient {
void set_paint_all_opaque(bool opaque) { paint_all_opaque_ = opaque; }
- void add_draw_rect(const gfx::Rect& rect) { draw_rects_.push_back(rect); }
+ void add_draw_rect(const gfx::Rect& rect, const SkPaint& paint) {
+ draw_rects_.push_back(std::make_pair(rect, paint));
+ }
private:
- typedef std::vector<gfx::Rect> RectVector;
+ typedef std::vector<std::pair<gfx::Rect, SkPaint> > RectPaintVector;
bool paint_all_opaque_;
- RectVector draw_rects_;
+ RectPaintVector draw_rects_;
};
} // namespace cc
« no previous file with comments | « cc/resources/picture_pile_impl_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698