blob: de83a0892f419b1a547d92842d46488b7519b957 [file]
/*
* Copyright 2023 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkTiledImageUtils.h"
namespace SkTiledImageUtils {
void DrawImageRect(SkCanvas* canvas,
const SkImage* image,
const SkRect& src,
const SkRect& dst,
const SkSamplingOptions& sampling,
const SkPaint* paint,
SkCanvas::SrcRectConstraint constraint) {
if (!image) {
return;
}
if (canvas->recordingContext() || canvas->recorder()) {
// TODO: branch off into Ganesh and Graphite specific tiling
}
canvas->drawImageRect(image, src, dst, sampling, paint, constraint);
}
} // namespace SkTiledImageUtils