New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638060 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

devirt-want: SkPicture::cullRect

Project Member Reported by krasin@chromium.org, Aug 16 2016

Issue description

SkPicture::cullRect is a virtual method called from DrawingDisplayItem::Raster:
https://cs.chromium.org/chromium/src/cc/playback/drawing_display_item.cc?q=DrawingDisplayItem::Raster&sq=package:chromium&l=82&dr=CSs

Its implementations are actually trivial, and can be potentially turned into a short switch statement:

SkRect SkBigPicture::cullRect() const override { return fCullRect; }
SkRect SkEmptyPicture::cullRect() const override { return SkRect::MakeEmpty(); }
SkRect SkMiniPicture::cullRect() const override { return fCull; }

This can be turned into something like (pseudo-code):

switch(typeof(picture_)) {
case SkBigPicture: static_cast<SkBigPicture*>(picture_)->fCullRect; 
case SkEmptyPicture: SkRect::MakeEmpty();
case SkMiniPicture: static_cast<SkMiniPicture*>(picture_)->fCull;
}

This looks like something that can be done automatically (and be worth it), but we need to find more places before we can justify spending time on implementing such optimization.
 

Comment 1 by krasin@chromium.org, Aug 16 2016

One more place: SkPicture::approximateOpCount. Bug: https://crbug.com/638064
Status: Assigned (was: Untriaged)

Sign in to add a comment