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

Unified Diff: cc/resources/picture.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index e0435dc6307a2894388740513c8971585412ea22..b1ca99d7a0cdb81bfc1d5668f9e6760619347e1c 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -19,7 +19,6 @@
#include "cc/debug/traced_value.h"
#include "cc/layers/content_layer_client.h"
#include "skia/ext/pixel_ref_utils.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkDrawPictureCallback.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -54,17 +53,16 @@ bool DecodeBitmap(const void* buffer, size_t size, SkBitmap* bm) {
} // namespace
-scoped_refptr<Picture> Picture::Create(
- const gfx::Rect& layer_rect,
- ContentLayerClient* client,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
- bool gather_pixel_refs,
- RecordingMode recording_mode) {
+scoped_refptr<Picture> Picture::Create(const gfx::Rect& layer_rect,
+ ContentLayerClient* client,
+ const gfx::Size& tile_grid_size,
+ bool gather_pixel_refs,
+ RecordingMode recording_mode) {
scoped_refptr<Picture> picture = make_scoped_refptr(new Picture(layer_rect));
- picture->Record(client, tile_grid_info, recording_mode);
+ picture->Record(client, tile_grid_size, recording_mode);
if (gather_pixel_refs)
- picture->GatherPixelRefs(tile_grid_info);
+ picture->GatherPixelRefs(tile_grid_size);
return picture;
}
@@ -170,7 +168,7 @@ bool Picture::HasText() const {
}
void Picture::Record(ContentLayerClient* painter,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
+ const gfx::Size& tile_grid_size,
RecordingMode recording_mode) {
TRACE_EVENT2("cc",
"Picture::Record",
@@ -180,7 +178,7 @@ void Picture::Record(ContentLayerClient* painter,
recording_mode);
DCHECK(!picture_);
- DCHECK(!tile_grid_info.fTileInterval.isEmpty());
+ DCHECK(!tile_grid_size.IsEmpty());
// TODO(mtklein): If SkRTree sticks, clean up tile_grid_info. skbug.com/3085
SkRTreeFactory factory;
@@ -232,8 +230,7 @@ void Picture::Record(ContentLayerClient* painter,
EmitTraceSnapshot();
}
-void Picture::GatherPixelRefs(
- const SkTileGridFactory::TileGridInfo& tile_grid_info) {
+void Picture::GatherPixelRefs(const gfx::Size& tile_grid_size) {
TRACE_EVENT2("cc", "Picture::GatherPixelRefs",
"width", layer_rect_.width(),
"height", layer_rect_.height());
@@ -242,11 +239,7 @@ void Picture::GatherPixelRefs(
DCHECK(pixel_refs_.empty());
if (!WillPlayBackBitmaps())
return;
- cell_size_ = gfx::Size(
- tile_grid_info.fTileInterval.width() +
- 2 * tile_grid_info.fMargin.width(),
- tile_grid_info.fTileInterval.height() +
- 2 * tile_grid_info.fMargin.height());
+ cell_size_ = tile_grid_size;
DCHECK_GT(cell_size_.width(), 0);
DCHECK_GT(cell_size_.height(), 0);
@@ -477,9 +470,7 @@ scoped_refptr<base::debug::ConvertableToTraceFormat>
scoped_refptr<base::debug::TracedValue> record_data =
new base::debug::TracedValue();
TracedValue::SetIDRef(this, record_data.get(), "picture_id");
- record_data->BeginArray("layer_rect");
- MathUtil::AddToTracedValue(layer_rect_, record_data.get());
- record_data->EndArray();
+ MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get());
return record_data;
}
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_layer_tiling.cc » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698