92 {
94 if (!sdc) {
95 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
97 }
98
103 }
105 rContext, fBitmap, "DrawResult_Draw_BitMap", mipmapped));
106 if (!view) {
107 *errorMsg = "Failed to create proxy.";
109 }
110
112
113
114 if (fUpscale) {
117 } else {
119 3*fBitmap.
width()/5 + 2, 4*fBitmap.
height()/5 + 2);
120 }
121
123
125 SkRect b = fUpscale ?
a.makeInset (.31f *
a.width(), .31f *
a.height())
126 :
a.makeOutset(.25f *
a.width(), .25f *
a.height());
128
129 b = fUpscale ?
a.makeInset (.25f *
a.width(), .35f *
a.height())
130 :
a.makeOutset(.20f *
a.width(), .35f *
a.height());
134
139 rContext, subsetBmp, "DrawResult_Draw_SubsetBitMap", mipmapped));
140
142
144
147 for (
int tm = 0; tm < textureMatrices.
size(); ++tm) {
150 auto wmy =
static_cast<Wrap>(my);
152 auto wmx =
static_cast<Wrap>(mx);
153
154 const auto& caps = *rContext->
priv().
caps();
155
157
159
160 std::unique_ptr<GrFragmentProcessor> fp1;
163 textureMatrices[tm],
164 sampler,
166 caps);
167 if (!fp1) {
168 continue;
169 }
170
171
172
173 static constexpr SkVector kT = {-100, 300};
175 std::move(fp1),
176 drawRect,
179 sdc->addDrawOp(std::move(op));
180 }
181
182 x += localRect.
width() + kTestPad;
183
184
185
189
192 subsetTextureMatrix,
193 sampler,
194 caps);
196 drawRect, localRect)) {
197 sdc->addDrawOp(std::move(op));
198 }
199
204 }
205 x += localRect.
width() + kTestPad;
206 }
210 }
211 y += localRect.
height() + kTestPad;
212 }
213 if (tm < textureMatrices.
size() - 1) {
218 }
219 }
221 }
constexpr SkColor SK_ColorRED
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeCachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, std::string_view label, skgpu::Mipmapped mipmapped)
#define SkScalarFloorToScalar(x)
const GrCaps * caps() const
bool mipmapSupport() const
GrRecordingContextPriv priv()
static std::unique_ptr< GrFragmentProcessor > MakeSubset(GrSurfaceProxyView, SkAlphaType, const SkMatrix &, GrSamplerState, const SkRect &subset, const GrCaps &caps, const float border[4]=kDefaultBorder, bool alwaysUseShaderTileMode=false)
static std::unique_ptr< GrFragmentProcessor > Make(GrSurfaceProxyView, SkAlphaType, const SkMatrix &=SkMatrix::I(), GrSamplerState::Filter=GrSamplerState::Filter::kNearest, GrSamplerState::MipmapMode mipmapMode=GrSamplerState::MipmapMode::kNone)
SkAlphaType alphaType() const
bool extractSubset(SkBitmap *dst, const SkIRect &subset) const
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
static SkMatrix Concat(const SkMatrix &a, const SkMatrix &b)
SkMatrix & postSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
SkMatrix & preRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkISize getISize() override
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
const myers::Point & get< 0 >(const myers::Segment &s)
GrOp::Owner MakeRect(GrRecordingContext *context, GrPaint &&paint, const SkRect &drawRect, const SkRect &localRect, const SkMatrix &localM)
SurfaceDrawContext * TopDeviceSurfaceDrawContext(const SkCanvas *canvas)
constexpr SkIPoint topLeft() const
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
constexpr SkRect makeOffset(float dx, float dy) const
SkRect makeOutset(float dx, float dy) const
constexpr float height() const
constexpr float right() const
constexpr float width() const
constexpr float bottom() const