| Index: cc/paint/paint_op_buffer.cc
|
| diff --git a/cc/paint/paint_op_buffer.cc b/cc/paint/paint_op_buffer.cc
|
| index a98392a162c839b240bcd7218dd7efe8f8687315..fa62a418e9fce2bb5fee71e9f6eb057567ac9171 100644
|
| --- a/cc/paint/paint_op_buffer.cc
|
| +++ b/cc/paint/paint_op_buffer.cc
|
| @@ -120,8 +120,12 @@ struct Rasterizer<DrawRecordOp, false> {
|
| // in the PaintOpBuffer::Raster function as DisplayItemList calls
|
| // into RasterWithAlpha directly.
|
| if (op->record->approximateOpCount() == 1) {
|
| - op->record->GetFirstOp()->RasterWithAlpha(canvas, alpha);
|
| - return;
|
| + PaintOp* single_op = op->record->GetFirstOp();
|
| + // RasterWithAlpha only supported for draw ops.
|
| + if (single_op->IsDrawOp()) {
|
| + single_op->RasterWithAlpha(canvas, alpha);
|
| + return;
|
| + }
|
| }
|
|
|
| canvas->saveLayerAlpha(nullptr, alpha);
|
| @@ -358,14 +362,6 @@ void PaintOp::RasterWithAlpha(SkCanvas* canvas, uint8_t alpha) const {
|
| g_raster_alpha_functions[type](this, canvas, alpha);
|
| }
|
|
|
| -DrawDisplayItemListOp::DrawDisplayItemListOp(
|
| - scoped_refptr<DisplayItemList> list)
|
| - : list(list) {}
|
| -
|
| -size_t DrawDisplayItemListOp::AdditionalBytesUsed() const {
|
| - return list->ApproximateMemoryUsage();
|
| -}
|
| -
|
| int ClipPathOp::CountSlowPaths() const {
|
| return antialias && !path.isConvex() ? 1 : 0;
|
| }
|
| @@ -412,6 +408,20 @@ AnnotateOp::AnnotateOp(PaintCanvas::AnnotationType annotation_type,
|
|
|
| AnnotateOp::~AnnotateOp() = default;
|
|
|
| +DrawDisplayItemListOp::DrawDisplayItemListOp(
|
| + scoped_refptr<DisplayItemList> list)
|
| + : list(list) {}
|
| +
|
| +size_t DrawDisplayItemListOp::AdditionalBytesUsed() const {
|
| + return list->ApproximateMemoryUsage();
|
| +}
|
| +
|
| +DrawDisplayItemListOp::DrawDisplayItemListOp(const DrawDisplayItemListOp& op) =
|
| + default;
|
| +
|
| +DrawDisplayItemListOp& DrawDisplayItemListOp::operator=(
|
| + const DrawDisplayItemListOp& op) = default;
|
| +
|
| DrawDisplayItemListOp::~DrawDisplayItemListOp() = default;
|
|
|
| DrawImageOp::DrawImageOp(const PaintImage& image,
|
|
|