Home | History | Annotate | Download | only in resources

Lines Matching defs:Picture

5 #include "cc/resources/picture.h"
84 scoped_refptr<Picture> Picture::Create(gfx::Rect layer_rect) {
85 return make_scoped_refptr(new Picture(layer_rect));
88 Picture::Picture(gfx::Rect layer_rect)
92 // the picture to be recorded in Picture::Record.
95 scoped_refptr<Picture> Picture::CreateFromSkpValue(const base::Value* value) {
96 // Decode the picture from base64.
105 // Read the picture. This creates an empty picture on failure.
113 return make_scoped_refptr(new Picture(skpicture, layer_rect, opaque_rect));
116 scoped_refptr<Picture> Picture::CreateFromValue(const base::Value* raw_value) {
121 // Decode the picture from base64.
146 // Read the picture. This creates an empty picture on failure.
151 return make_scoped_refptr(new Picture(skpicture, layer_rect, opaque_rect));
154 Picture::Picture(SkPicture* picture,
159 picture_(skia::AdoptRef(picture)),
163 Picture::Picture(const skia::RefPtr<SkPicture>& picture,
169 picture_(picture),
174 Picture::~Picture() {
176 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::Picture", this);
179 scoped_refptr<Picture> Picture::GetCloneForDrawingOnThread(
187 void Picture::CloneForDrawing(int num_threads) {
188 TRACE_EVENT1("cc", "Picture::CloneForDrawing", "num_threads", num_threads);
196 scoped_refptr<Picture> clone = make_scoped_refptr(
197 new Picture(skia::AdoptRef(new SkPicture(clones[i])),
207 void Picture::Record(ContentLayerClient* painter,
209 TRACE_EVENT1("cc", "Picture::Record",
244 void Picture::GatherPixelRefs(
246 TRACE_EVENT2("cc", "Picture::GatherPixelRefs",
299 int Picture::Raster(
306 "Picture::Raster",
324 "cc", "Picture::Raster",
329 void Picture::Replay(SkCanvas* canvas) {
330 TRACE_EVENT_BEGIN0("cc", "Picture::Replay");
336 TRACE_EVENT_END1("cc", "Picture::Replay",
340 scoped_ptr<base::Value> Picture::AsValue() const {
343 // Serialize the picture.
346 // Encode the picture as base64.
361 void Picture::EmitTraceSnapshot() {
363 "cc::Picture", this, TracedPicture::AsTraceablePicture(this));
366 void Picture::EmitTraceSnapshotAlias(Picture* original) {
369 "cc::Picture",
374 base::LazyInstance<Picture::PixelRefs>
375 Picture::PixelRefIterator::empty_pixel_refs_;
377 Picture::PixelRefIterator::PixelRefIterator()
387 Picture::PixelRefIterator::PixelRefIterator(
389 const Picture* picture)
390 : picture_(picture),
393 gfx::Rect layer_rect = picture->layer_rect_;
394 gfx::Size cell_size = picture->cell_size_;
397 // Early out if the query rect doesn't intersect this picture.
420 std::max(min_point_.x(), picture->min_pixel_cell_.x()),
421 std::max(min_point_.y(), picture->min_pixel_cell_.y()));
423 std::min(max_point_.x(), picture->max_pixel_cell_.x()),
424 std::min(max_point_.y(), picture->max_pixel_cell_.y()));
434 Picture::PixelRefIterator::~PixelRefIterator() {
437 Picture::PixelRefIterator& Picture::PixelRefIterator::operator++() {
474 Picture::AsTraceableRasterData(float scale) const {
482 Picture::AsTraceableRecordData() const {