/external/skia/gm/ |
D | xfermodeimagefilter.cpp | 49 fBitmap = ToolUtils::create_string_bitmap(80, 80, 0xD000D000, 15, 65, 96, "e"); in onOnceBeforeDraw() 95 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() 96 x += fBitmap.width() + MARGIN; in onDraw() 97 if (x + fBitmap.width() > WIDTH) { in onDraw() 99 y += fBitmap.height() + MARGIN; in onDraw() 104 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() 105 x += fBitmap.width() + MARGIN; in onDraw() 106 if (x + fBitmap.width() > WIDTH) { in onDraw() 108 y += fBitmap.height() + MARGIN; in onDraw() 112 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() [all …]
|
D | texelsubset.cpp | 79 GetResourceAsBitmap("images/mandrill_128.png", &fBitmap); in onOnceBeforeDraw() 81 fBitmap.extractSubset(&fBitmap, SkIRect::MakeSize(fBitmap.dimensions()).makeInset(0, 20)); in onOnceBeforeDraw() 82 SkASSERT(fBitmap.dimensions() == kImageSize); in onOnceBeforeDraw() 92 auto view = std::get<0>(GrMakeCachedBitmapProxyView(context, fBitmap, mipmapped)); in onDraw() 102 texelSubset = SkIRect::MakeXYWH(fBitmap.width()/3 - 1, 2*fBitmap.height()/5 - 1, in onDraw() 103 fBitmap.width()/4 + 2, fBitmap.height()/5 + 2); in onDraw() 105 texelSubset = SkIRect::MakeXYWH( fBitmap.width()/8 - 1, fBitmap.height()/7 - 1, in onDraw() 106 3*fBitmap.width()/5 + 2, 4*fBitmap.height()/5 + 2); in onDraw() 123 fBitmap.extractSubset(&subsetBmp, texelSubset); in onDraw() 127 SkRect localRect = SkRect::Make(fBitmap.bounds()).makeOutset(kDrawPad, kDrawPad); in onDraw() [all …]
|
D | tileimagefilter.cpp | 50 fBitmap = ToolUtils::create_string_image(50, 50, 0xD000D000, 10, 45, 50, "e"); in onOnceBeforeDraw() 68 sk_sp<SkImage> image = (i & 0x01) ? fCheckerboard : fBitmap; in onDraw() 84 canvas->drawImage(fBitmap.get(), 0, 0, SkSamplingOptions(), &paint); in onDraw() 102 SkRect srcRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width()), in onDraw() 103 SkIntToScalar(fBitmap->height())); in onDraw() 104 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width() * 2), in onDraw() 105 SkIntToScalar(fBitmap->height() * 2)); in onDraw() 115 canvas->drawImage(fBitmap.get(), 0, 0); in onDraw() 140 sk_sp<SkImage> fBitmap, fCheckerboard; member in skiagm::TileImageFilterGM
|
/external/skqp/gm/ |
D | xfermodeimagefilter.cpp | 38 fBitmap = sk_tool_utils::create_string_bitmap(80, 80, 0xD000D000, 15, 65, 96, "e"); in onOnceBeforeDraw() 88 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() 89 x += fBitmap.width() + MARGIN; in onDraw() 90 if (x + fBitmap.width() > WIDTH) { in onDraw() 92 y += fBitmap.height() + MARGIN; in onDraw() 98 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() 99 x += fBitmap.width() + MARGIN; in onDraw() 100 if (x + fBitmap.width() > WIDTH) { in onDraw() 102 y += fBitmap.height() + MARGIN; in onDraw() 106 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw() [all …]
|
D | tileimagefilter.cpp | 38 fBitmap = SkImage::MakeFromBitmap( in onOnceBeforeDraw() 59 sk_sp<SkImage> image = (i & 0x01) ? fCheckerboard : fBitmap; in onDraw() 76 canvas->drawImage(fBitmap.get(), 0, 0, &paint); in onDraw() 92 SkRect srcRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width()), in onDraw() 93 SkIntToScalar(fBitmap->height())); in onDraw() 94 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width() * 2), in onDraw() 95 SkIntToScalar(fBitmap->height() * 2)); in onDraw() 105 canvas->drawImage(fBitmap.get(), 0, 0); in onDraw() 127 sk_sp<SkImage> fBitmap, fCheckerboard; member in skiagm::TileImageFilterGM
|
D | morphology.cpp | 29 fBitmap.allocN32Pixels(135, 135); in onOnceBeforeDraw() 30 SkCanvas canvas(fBitmap); in onOnceBeforeDraw() 48 SkIntToScalar(fBitmap.width()), SkIntToScalar(fBitmap.height()))); in drawClippedBitmap() 49 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap() 87 SkBitmap fBitmap; member in skiagm::MorphologyGM
|
/external/skqp/src/image/ |
D | SkSurface_Raster.cpp | 31 SkBitmap fBitmap; member in SkSurface_Raster 75 fBitmap.installPixels(info, pixels, rb, releaseProc, context); in SkSurface_Raster() 84 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster() 86 fBitmap.setPixelRef(std::move(pr), 0, 0); in SkSurface_Raster() 90 SkCanvas* SkSurface_Raster::onNewCanvas() { return new SkCanvas(fBitmap, this->props()); } in onNewCanvas() 98 canvas->drawBitmap(fBitmap, x, y, paint); in onDraw() 103 SkASSERT(SkIRect::MakeWH(fBitmap.width(), fBitmap.height()).contains(*subset)); in onNewImageSnapshot() 105 dst.allocPixels(fBitmap.info().makeWH(subset->width(), subset->height())); in onNewImageSnapshot() 106 SkAssertResult(fBitmap.readPixels(dst.pixmap(), subset->left(), subset->top())); in onNewImageSnapshot() 115 if (SkPixelRef* pr = fBitmap.pixelRef()) { in onNewImageSnapshot() [all …]
|
D | SkImage_Raster.cpp | 76 return fBitmap.info(); in onImageInfo() 81 const SkBitmap* onPeekBitmap() const override { return &fBitmap; } in onPeekBitmap() 91 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } in getPixelRef() 99 , fBitmap(bm) in SkImage_Raster() 101 SkASSERT(bitmapMayBeMutable || fBitmap.isImmutable()); in SkImage_Raster() 111 SkASSERT(fBitmap.pixelRef()); in notifyAddedToRasterCache() 112 fBitmap.pixelRef()->notifyAddedToCache(); in notifyAddedToRasterCache() 122 SkBitmap fBitmap; member in SkImage_Raster 146 fBitmap.installPixels(info, addr, rowBytes, release_data, data.release()); in SkImage_Raster() 147 fBitmap.setImmutable(); in SkImage_Raster() [all …]
|
/external/mesa3d/src/gallium/targets/haiku-softpipe/ |
D | SoftwareRenderer.cpp | 47 fBitmap(NULL), in SoftwareRenderer() 80 fContextID = fContextObj->CreateContext(fBitmap); in SoftwareRenderer() 101 if (fBitmap) in ~SoftwareRenderer() 102 delete fBitmap; in ~SoftwareRenderer() 120 if (fBitmap && cs == fColorSpace && fContextObj->Validate(fWidth, fHeight)) { in LockGL() 121 fContextObj->SetCurrentContext(fBitmap, fContextID); in LockGL() 128 fContextObj->SetCurrentContext(fBitmap, fContextID); in LockGL() 148 if (!fBitmap) in SwapBuffers() 159 GLView()->DrawBitmap(fBitmap, B_ORIGIN); in SwapBuffers() 169 != fBitmap->Bounds().IntegerHeight() in SwapBuffers() [all …]
|
/external/skia/src/image/ |
D | SkSurface_Raster.cpp | 31 SkBitmap fBitmap; member in SkSurface_Raster 66 fBitmap.installPixels(info, pixels, rb, releaseProc, context); in SkSurface_Raster() 74 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster() 75 fBitmap.setPixelRef(std::move(pr), 0, 0); in SkSurface_Raster() 79 SkCanvas* SkSurface_Raster::onNewCanvas() { return new SkCanvas(fBitmap, this->props()); } in onNewCanvas() 87 canvas->drawImage(fBitmap.asImage().get(), x, y, sampling, paint); in onDraw() 92 SkASSERT(SkIRect::MakeWH(fBitmap.width(), fBitmap.height()).contains(*subset)); in onNewImageSnapshot() 94 dst.allocPixels(fBitmap.info().makeDimensions(subset->size())); in onNewImageSnapshot() 95 SkAssertResult(fBitmap.readPixels(dst.pixmap(), subset->left(), subset->top())); in onNewImageSnapshot() 104 if (SkPixelRef* pr = fBitmap.pixelRef()) { in onNewImageSnapshot() [all …]
|
D | SkImage_Raster.cpp | 85 const SkBitmap* onPeekBitmap() const override { return &fBitmap; } in onPeekBitmap() 90 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } in getPixelRef() 97 , fBitmap(bm) { in SkImage_Raster() 98 SkASSERT(bitmapMayBeMutable || fBitmap.isImmutable()); in SkImage_Raster() 111 SkASSERT(fBitmap.pixelRef()); in notifyAddedToRasterCache() 112 fBitmap.pixelRef()->notifyAddedToCache(); in notifyAddedToRasterCache() 121 bool onHasMipmaps() const override { return SkToBool(fBitmap.fMips); } in onHasMipmaps() 123 SkMipmap* onPeekMips() const override { return fBitmap.fMips.get(); } in onPeekMips() 126 auto img = new SkImage_Raster(fBitmap); in onMakeWithMipmaps() 128 img->fBitmap.fMips = std::move(mips); in onMakeWithMipmaps() [all …]
|
/external/skqp/src/android/ |
D | SkAnimatedImage.cpp | 37 if (!image->fDisplayFrame.fBitmap.getPixels()) { in Make() 56 if (!image->fDisplayFrame.fBitmap.getPixels()) { in Make() 79 if (!fDecodingFrame.fBitmap.tryAllocPixels(fDecodeInfo)) { in SkAnimatedImage() 103 if (fBitmap.getPixels()) { in init() 104 if (fBitmap.pixelRef()->unique()) { in init() 105 SkAssertResult(fBitmap.setAlphaType(info.alphaType())); in init() 118 memcpy(tmp.getPixels(), fBitmap.getPixels(), fBitmap.computeByteSize()); in init() 120 swap(tmp, fBitmap); in init() 125 return fBitmap.tryAllocPixels(info); in init() 129 if (!dst->init(fBitmap.info(), OnInit::kNoRestore)) { in copyTo() [all …]
|
/external/skia/src/effects/ |
D | SkTableColorFilter.cpp | 25 fBitmap.allocPixels(SkImageInfo::MakeA8(256, 4)); in SkTable_ColorFilter() 26 uint8_t *a = fBitmap.getAddr8(0,0), in SkTable_ColorFilter() 27 *r = fBitmap.getAddr8(0,1), in SkTable_ColorFilter() 28 *g = fBitmap.getAddr8(0,2), in SkTable_ColorFilter() 29 *b = fBitmap.getAddr8(0,3); in SkTable_ColorFilter() 36 fBitmap.setImmutable(); in SkTable_ColorFilter() 51 const uint8_t *a = fBitmap.getAddr8(0,0), in onAppendStages() 52 *r = fBitmap.getAddr8(0,1), in onAppendStages() 53 *g = fBitmap.getAddr8(0,2), in onAppendStages() 54 *b = fBitmap.getAddr8(0,3); in onAppendStages() [all …]
|
/external/skqp/tools/skdiff/ |
D | skdiff_utils.cpp | 57 if (!resource.fBitmap.setInfo(info.makeColorType(kN32_SkColorType))) { in get_bitmap() 67 if (!resource.fBitmap.tryAllocPixels()) { in get_bitmap() 73 if (SkCodec::kSuccess != codec->getPixels(resource.fBitmap.info(), in get_bitmap() 74 resource.fBitmap.getPixels(), resource.fBitmap.rowBytes())) { in get_bitmap() 148 const int w = drp->fBase.fBitmap.width(); in create_and_write_diff_image() 149 const int h = drp->fBase.fBitmap.height(); in create_and_write_diff_image() 151 if (w != drp->fComparison.fBitmap.width() || h != drp->fComparison.fBitmap.height()) { in create_and_write_diff_image() 154 drp->fDifference.fBitmap.allocN32Pixels(w, h); in create_and_write_diff_image() 156 drp->fWhite.fBitmap.allocN32Pixels(w, h); in create_and_write_diff_image() 179 if (write_bitmap(drp->fDifference.fFullPath, drp->fDifference.fBitmap)) { in create_and_write_diff_image() [all …]
|
D | skdiff.cpp | 159 const int w = dr->fComparison.fBitmap.width(); in compute_diff() 160 const int h = dr->fComparison.fBitmap.height(); in compute_diff() 161 if (w != dr->fBase.fBitmap.width() || h != dr->fBase.fBitmap.height()) { in compute_diff() 177 SkPMColor c0 = *dr->fBase.fBitmap.getAddr32(x, y); in compute_diff() 178 SkPMColor c1 = *dr->fComparison.fBitmap.getAddr32(x, y); in compute_diff() 205 *dr->fDifference.fBitmap.getAddr32(x, y) = outputDifference; in compute_diff() 206 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_WHITE; in compute_diff() 208 *dr->fDifference.fBitmap.getAddr32(x, y) = 0; in compute_diff() 209 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_BLACK; in compute_diff()
|
/external/skia/tools/skdiff/ |
D | skdiff_utils.cpp | 57 if (!resource.fBitmap.setInfo(info.makeColorType(kN32_SkColorType))) { in get_bitmap() 67 if (!resource.fBitmap.tryAllocPixels()) { in get_bitmap() 73 if (SkCodec::kSuccess != codec->getPixels(resource.fBitmap.info(), in get_bitmap() 74 resource.fBitmap.getPixels(), resource.fBitmap.rowBytes())) { in get_bitmap() 147 const int w = drp->fBase.fBitmap.width(); in create_and_write_diff_image() 148 const int h = drp->fBase.fBitmap.height(); in create_and_write_diff_image() 150 if (w != drp->fComparison.fBitmap.width() || h != drp->fComparison.fBitmap.height()) { in create_and_write_diff_image() 153 drp->fDifference.fBitmap.allocN32Pixels(w, h); in create_and_write_diff_image() 155 drp->fWhite.fBitmap.allocN32Pixels(w, h); in create_and_write_diff_image() 178 if (write_bitmap(drp->fDifference.fFullPath, drp->fDifference.fBitmap)) { in create_and_write_diff_image() [all …]
|
D | skdiff.cpp | 159 const int w = dr->fComparison.fBitmap.width(); in compute_diff() 160 const int h = dr->fComparison.fBitmap.height(); in compute_diff() 161 if (w != dr->fBase.fBitmap.width() || h != dr->fBase.fBitmap.height()) { in compute_diff() 177 SkPMColor c0 = *dr->fBase.fBitmap.getAddr32(x, y); in compute_diff() 178 SkPMColor c1 = *dr->fComparison.fBitmap.getAddr32(x, y); in compute_diff() 205 *dr->fDifference.fBitmap.getAddr32(x, y) = outputDifference; in compute_diff() 206 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_WHITE; in compute_diff() 208 *dr->fDifference.fBitmap.getAddr32(x, y) = 0; in compute_diff() 209 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_BLACK; in compute_diff()
|
/external/skqp/samplecode/ |
D | SampleUnpremul.cpp | 99 header.appendf(" [%dx%d] %s", fBitmap.width(), fBitmap.height(), in onDrawContent() 119 bm.allocN32Pixels(fBitmap.width(), fBitmap.height()); in onDrawContent() 120 for (int i = 0; i < fBitmap.width(); ++i) { in onDrawContent() 121 for (int j = 0; j < fBitmap.height(); ++j) { in onDrawContent() 122 *bm.getAddr32(i, j) = premultiply_unpmcolor(*fBitmap.getAddr32(i, j)); in onDrawContent() 127 canvas->drawBitmap(fBitmap, 0, 0); in onDrawContent() 136 SkBitmap fBitmap; member in UnpremulView 163 fDecodeSucceeded = decode_file(fCurrFile.c_str(), &fBitmap, kN32_SkColorType, !fPremul); in decodeCurrFile()
|
/external/skia/src/android/ |
D | SkAnimatedImage.cpp | 34 if (!image->fDisplayFrame.fBitmap.getPixels()) { in Make() 92 if (!fDecodingFrame.fBitmap.tryAllocPixels(fDecodeInfo)) { in SkAnimatedImage() 116 if (fBitmap.getPixels()) { in init() 117 if (fBitmap.pixelRef()->unique()) { in init() 118 SkAssertResult(fBitmap.setAlphaType(info.alphaType())); in init() 131 memcpy(tmp.getPixels(), fBitmap.getPixels(), fBitmap.computeByteSize()); in init() 133 swap(tmp, fBitmap); in init() 138 return fBitmap.tryAllocPixels(info); in init() 142 if (!dst->init(fBitmap.info(), OnInit::kNoRestore)) { in copyTo() 146 memcpy(dst->fBitmap.getPixels(), fBitmap.getPixels(), fBitmap.computeByteSize()); in copyTo() [all …]
|
/external/skqp/src/gpu/ |
D | GrBitmapTextureMaker.cpp | 24 , fBitmap(bitmap) { in GrBitmapTextureMaker() 51 proxy = proxyProvider->createMipMapProxyFromBitmap(fBitmap); in refOriginalTextureProxy() 54 proxy = GrUploadBitmapToTextureProxy(proxyProvider, fBitmap); in refOriginalTextureProxy() 64 fOriginalKey, proxyProvider->contextUniqueID(), fBitmap.pixelRef()); in refOriginalTextureProxy() 90 fBitmap.pixelRef()); in refOriginalTextureProxy() 110 GrInstallBitmapUniqueKeyInvalidator(copyKey, contextUniqueID, fBitmap.pixelRef()); in didCacheCopy() 114 return fBitmap.alphaType(); in alphaType() 118 return fBitmap.colorSpace(); in colorSpace()
|
/external/skqp/bench/ |
D | BitmapRectBench.cpp | 43 SkBitmap fBitmap; member in BitmapRectBench 59 fBitmap.setInfo(SkImageInfo::MakeN32Premul(kWidth, kHeight)); in BitmapRectBench() 72 fBitmap.allocPixels(); in onDelayedSetup() 73 fBitmap.setAlphaType(kOpaque_SkAlphaType); in onDelayedSetup() 74 fBitmap.eraseColor(SK_ColorBLACK); in onDelayedSetup() 75 draw_into_bitmap(fBitmap); in onDelayedSetup() 100 canvas->drawBitmapRect(fBitmap, fSrcR, fDstR, &paint, in onDraw()
|
D | RepeatTileBench.cpp | 39 SkBitmap fBitmap; member in RepeatTileBench 45 fBitmap.setInfo(SkImageInfo::Make(w, h, ct, at)); in RepeatTileBench() 56 fBitmap.allocPixels(); in onDelayedSetup() 57 fBitmap.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorWHITE : 0); in onDelayedSetup() 59 draw_into_bitmap(fBitmap); in onDelayedSetup() 61 fPaint.setShader(SkShader::MakeBitmapShader(fBitmap, in onDelayedSetup()
|
/external/skia/bench/ |
D | RepeatTileBench.cpp | 39 SkBitmap fBitmap; member in RepeatTileBench 45 fBitmap.setInfo(SkImageInfo::Make(w, h, ct, at)); in RepeatTileBench() 57 fBitmap.allocPixels(); in onDelayedSetup() 58 fBitmap.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorWHITE : 0); in onDelayedSetup() 60 draw_into_bitmap(fBitmap); in onDelayedSetup() 62 fPaint.setShader(fBitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, in onDelayedSetup()
|
/external/skia/tests/ |
D | RecordingXfermodeTest.cpp | 83 fBitmap.allocPixels(imageInfo); in BitmapBackedCanvasStrategy() 88 SkCanvas canvas(fBitmap); in recordAndReplay() 93 return fBitmap; in recordAndReplay() 97 SkBitmap fBitmap; member in __anona6b41af90111::BitmapBackedCanvasStrategy 106 fBitmap.allocPixels(imageInfo); in PictureStrategy() 122 SkCanvas replayCanvas(fBitmap); in recordAndReplay() 126 return fBitmap; in recordAndReplay() 130 SkBitmap fBitmap; member in __anona6b41af90111::PictureStrategy
|
/external/skqp/tests/ |
D | RecordingXfermodeTest.cpp | 81 fBitmap.allocPixels(imageInfo); in BitmapBackedCanvasStrategy() 86 SkCanvas canvas(fBitmap); in recordAndReplay() 91 return fBitmap; in recordAndReplay() 95 SkBitmap fBitmap; member in __anon6a7ab8100111::BitmapBackedCanvasStrategy 104 fBitmap.allocPixels(imageInfo); in PictureStrategy() 120 SkCanvas replayCanvas(fBitmap); in recordAndReplay() 124 return fBitmap; in recordAndReplay() 128 SkBitmap fBitmap; member in __anon6a7ab8100111::PictureStrategy
|