mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
1c6a531e89
* Fix pixel rounding error in the picture layer by first ensuring that the texture for the image is at least as big as the next integer size along each dimension and using kStrict_SrcRectConstraint while drawing the same image. We already select the source subset by looking at the cull rect of the picture. * Decompose the transformation matrix into a series of operations that generated the same to calculate the scale at which to rasterize the picture. This make the rasterization scale resilient to transformations that introduce a perspective component to the resultant matrix. * The scale in the decomposed matrix is now part of the key in the cache. * Raster cache images that could never be rasterized were still taking part in the cache. Now, those entries are rejected early on. This leads to the sweep after the frame iterating over fewer items. * Added a unit test target.
25 lines
802 B
C++
25 lines
802 B
C++
// Copyright 2017 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.
|
|
|
|
#ifndef FLUTTER_FLOW_DEBUG_PRINT_H_
|
|
#define FLUTTER_FLOW_DEBUG_PRINT_H_
|
|
|
|
#include "flutter/flow/matrix_decomposition.h"
|
|
#include "flutter/flow/raster_cache_key.h"
|
|
#include "lib/ftl/macros.h"
|
|
#include "third_party/skia/include/core/SkMatrix.h"
|
|
#include "third_party/skia/include/core/SkMatrix44.h"
|
|
#include "third_party/skia/include/core/SkPoint3.h"
|
|
|
|
#define DEF_PRINTER(x) std::ostream& operator<<(std::ostream&, const x&);
|
|
|
|
DEF_PRINTER(flow::RasterCacheKey);
|
|
DEF_PRINTER(flow::MatrixDecomposition);
|
|
DEF_PRINTER(SkMatrix);
|
|
DEF_PRINTER(SkMatrix44);
|
|
DEF_PRINTER(SkVector3);
|
|
DEF_PRINTER(SkVector4);
|
|
|
|
#endif // FLUTTER_FLOW_DEBUG_PRINT_H_
|