Lines Matching defs:bitmap

284 sk_sp<GrTextureProxy> GrProxyProvider::createProxyFromBitmap(const SkBitmap& bitmap,
295 if (!SkImageInfoIsValid(bitmap.info())) {
301 bitmap.width(), bitmap.height());
304 // even if its mutable. In ddl, if the bitmap is mutable then we must make a copy since the
305 // upload of the data to the gpu can happen at anytime and the bitmap may change by then.
306 SkBitmap copyBitmap = bitmap;
307 if (!this->renderingDirectly() && !bitmap.isImmutable()) {
309 if (!bitmap.readPixels(copyBitmap.pixmap())) {
340 sk_sp<GrTextureProxy> GrProxyProvider::createNonMippedProxyFromBitmap(const SkBitmap& bitmap,
343 auto dims = bitmap.dimensions();
345 auto colorType = SkColorTypeToGrColorType(bitmap.colorType());
352 [bitmap](GrResourceProvider* resourceProvider, const LazySurfaceDesc& desc) {
354 GrMipLevel mipLevel = {bitmap.getPixels(), bitmap.rowBytes(), nullptr};
355 auto colorType = SkColorTypeToGrColorType(bitmap.colorType());
374 SkASSERT(proxy->dimensions() == bitmap.dimensions());
378 sk_sp<GrTextureProxy> GrProxyProvider::createMippedProxyFromBitmap(const SkBitmap& bitmap,
382 auto colorType = SkColorTypeToGrColorType(bitmap.colorType());
388 sk_sp<SkMipmap> mipmaps(SkMipmap::Build(bitmap.pixmap(), nullptr));
393 auto dims = bitmap.dimensions();
396 [bitmap, mipmaps](GrResourceProvider* resourceProvider, const LazySurfaceDesc& desc) {
399 auto colorType = SkColorTypeToGrColorType(bitmap.colorType());
401 texels[0].fPixels = bitmap.getPixels();
402 texels[0].fRowBytes = bitmap.rowBytes();
410 SkASSERT(generatedMipLevel.fPixmap.colorType() == bitmap.colorType());
431 SkASSERT(proxy->dimensions() == bitmap.dimensions());