summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_content_layer_client.h
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:38:57 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:38:57 +0000
commitc410a989feffdd7b1825b0600e9f32a3c01b4610 (patch)
tree34088f3608126326211b9f2039bfb549a539c5da /cc/test/fake_content_layer_client.h
parentd5f4177dd7237b252c6083b18fb62e3990f85452 (diff)
downloadchromium_src-c410a989feffdd7b1825b0600e9f32a3c01b4610.zip
chromium_src-c410a989feffdd7b1825b0600e9f32a3c01b4610.tar.gz
chromium_src-c410a989feffdd7b1825b0600e9f32a3c01b4610.tar.bz2
cc: Only consider layer clipped content rect for analysis
This fixes a problem in which tiles that are on the right and bottom edges of the viewport are not considered solid, even when the visible part of them is solid. BUG=230875 Review URL: https://chromiumcodereview.appspot.com/14205005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_content_layer_client.h')
-rw-r--r--cc/test/fake_content_layer_client.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index 462fa47..e987b11 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