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

Unified Diff: cc/resources/drawing_display_item.cc

Issue 939463003: Resolve FIXMEs in cc for Display Item Lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/resources/drawing_display_item.h ('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/resources/drawing_display_item.cc
diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display_item.cc
index 0fe86f40d272098922a360cc00caf6b13912d47f..055607abe6b25027ec3b1f1a33b99187dbf143ca 100644
--- a/cc/resources/drawing_display_item.cc
+++ b/cc/resources/drawing_display_item.cc
@@ -17,9 +17,8 @@
namespace cc {
-DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<SkPicture> picture,
- gfx::PointF location)
- : picture_(picture), location_(location) {
+DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<SkPicture> picture)
+ : picture_(picture) {
}
DrawingDisplayItem::~DrawingDisplayItem() {
@@ -28,7 +27,7 @@ DrawingDisplayItem::~DrawingDisplayItem() {
void DrawingDisplayItem::Raster(SkCanvas* canvas,
SkDrawPictureCallback* callback) const {
canvas->save();
- canvas->translate(location_.x(), location_.y());
+ canvas->translate(picture_->cullRect().x(), picture_->cullRect().y());
ajuma 2015/02/17 22:43:30 Since location_ is currently being set to (0, 0),
Stephen Chennney 2015/02/19 15:36:52 Done. The unit test needed updating to match.
if (callback)
picture_->playback(canvas, callback);
else
@@ -38,7 +37,7 @@ void DrawingDisplayItem::Raster(SkCanvas* canvas,
void DrawingDisplayItem::RasterForTracing(SkCanvas* canvas) const {
canvas->save();
- canvas->translate(location_.x(), location_.y());
+ canvas->translate(picture_->cullRect().x(), picture_->cullRect().y());
// The picture debugger in about:tracing doesn't drill down into |drawPicture|
// operations. Calling |playback()| rather than |drawPicture()| causes the
// skia operations in |picture_| to appear individually in the picture
@@ -65,9 +64,11 @@ void DrawingDisplayItem::AsValueInto(
base::trace_event::TracedValue* array) const {
array->BeginDictionary();
array->SetString("name", "DrawingDisplayItem");
- array->SetString("location",
- base::StringPrintf("[%f,%f]", picture_->cullRect().x(),
- picture_->cullRect().y()));
+ array->SetString(
+ "cullRect",
+ base::StringPrintf("[%f,%f,%f,%f]", picture_->cullRect().x(),
+ picture_->cullRect().y(), picture_->cullRect().width(),
+ picture_->cullRect().height()));
std::string b64_picture;
PictureDebugUtil::SerializeAsBase64(picture_.get(), &b64_picture);
array->SetString("skp64", b64_picture);
« no previous file with comments | « cc/resources/drawing_display_item.h ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698