blob: 65d535569226c22f5d651c386b170ab4916fd7d0 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "third_party/skia/include/utils/SkNWayCanvas.h"
namespace cc {
class ImageDecodeController;
class ImageHijackCanvas : public SkNWayCanvas {
ImageHijackCanvas(int width,
int height,
ImageDecodeController* image_decode_controller);
// Ensure that pictures are unpacked by this canvas, instead of being
// forwarded to the raster canvas.
void onDrawPicture(const SkPicture* picture,
const SkMatrix* matrix,
const SkPaint* paint) override;
void onDrawImage(const SkImage* image,
SkScalar x,
SkScalar y,
const SkPaint* paint) override;
void onDrawImageRect(const SkImage* image,
const SkRect* src,
const SkRect& dst,
const SkPaint* paint,
SrcRectConstraint constraint) override;
void onDrawImageNine(const SkImage* image,
const SkIRect& center,
const SkRect& dst,
const SkPaint* paint) override;
ImageDecodeController* image_decode_controller_;
} // namespace cc