Definition at line 178 of file lazytiling.cpp.
◆ LazyTilingGM()
Definition at line 180 of file lazytiling.cpp.
181 : fOrigin(origin)
183 kContentSize, kContentSize)) {
184 this->setBGColor(0xFFCCCCCC);
185 }
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
◆ getISize()
SkISize skiagm::LazyTilingGM::getISize |
( |
| ) |
|
|
inlineoverrideprotected |
Definition at line 192 of file lazytiling.cpp.
static constexpr SkISize Make(int32_t w, int32_t h)
◆ getName()
SkString skiagm::LazyTilingGM::getName |
( |
| ) |
const |
|
inlineoverrideprotected |
Definition at line 188 of file lazytiling.cpp.
188 {
190 }
@ kTopLeft_GrSurfaceOrigin
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
◆ onDraw()
Definition at line 214 of file lazytiling.cpp.
214 {
216 if (!sdc) {
217 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
219 }
220
229 kContentSize, kContentSize);
230
232
234 sdc,
235 fView,
236 fContentRect,
237 cellRect,
238 texMatrix,
241
242 x += 2*kContentSize+kPad;
243 }
244
245 y += 2*kContentSize+kPad;
246 }
247
249 }
static constexpr GrSamplerState::WrapMode SkTileModeToWrapMode(SkTileMode tileMode)
const GrCaps * caps() const
GrRecordingContextPriv priv()
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
static void draw_texture(const GrCaps *caps, skgpu::ganesh::SurfaceDrawContext *sdc, const GrSurfaceProxyView &src, const SkIRect &srcRect, const SkIRect &drawRect, const SkMatrix &mat, GrSamplerState::WrapMode xTileMode, GrSamplerState::WrapMode yTileMode)
SurfaceDrawContext * TopDeviceSurfaceDrawContext(const SkCanvas *canvas)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
◆ onGpuSetup()
Definition at line 194 of file lazytiling.cpp.
194 {
196 if (!dContext || dContext->abandoned()) {
198 }
199
201 { kLeftContentOffset + kContentSize + kRightContentPadding,
202 kTopContentOffset + kContentSize + kBottomContentPadding },
203 fOrigin);
204
206 if (!fView.
proxy()) {
207 *errorMsg = "Failed to create proxy";
209 }
210
212 }
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
GrSurfaceProxy * proxy() const
virtual GrRecordingContext * recordingContext() const
static GrSurfaceProxyView create_view(GrDirectContext *dContext, const SkBitmap &src, GrSurfaceOrigin origin)
static SkBitmap create_bitmap(SkIRect contentRect, SkISize fullSize, GrSurfaceOrigin origin)
The documentation for this class was generated from the following file: