Flutter Engine
The Flutter Engine
SkMatrixUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkMatrixUtils_DEFINED
9#define SkMatrixUtils_DEFINED
10
12#include "include/core/SkSize.h"
13
14class SkMatrix;
16
17/**
18 * Given a matrix, size and an antialias setting, return true if the computed dst-rect
19 * would align such that there is a 1-to-1 coorspondence between src and dst pixels.
20 * This can be called by drawing code to see if drawBitmap can be turned into
21 * drawSprite (which is faster).
22 *
23 * The src-rect is defined to be { 0, 0, size.width(), size.height() }
24 */
25bool SkTreatAsSprite(const SkMatrix&, const SkISize& size, const SkSamplingOptions&,
26 bool isAntiAlias);
27
28/** Decomposes the upper-left 2x2 of the matrix into a rotation (represented by
29 the cosine and sine of the rotation angle), followed by a non-uniform scale,
30 followed by another rotation. If there is a reflection, one of the scale
31 factors will be negative.
32 Returns true if successful. Returns false if the matrix is degenerate.
33 */
35 SkPoint* rotation1,
37 SkPoint* rotation2);
38
39#endif
bool SkTreatAsSprite(const SkMatrix &, const SkISize &size, const SkSamplingOptions &, bool isAntiAlias)
Definition: SkMatrix.cpp:1614
bool SkDecomposeUpper2x2(const SkMatrix &matrix, SkPoint *rotation1, SkPoint *scale, SkPoint *rotation2)
Definition: SkMatrix.cpp:1689
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
const Scalar scale
Definition: SkSize.h:16