Home
last modified time | relevance | path

Searched refs:fBitmap (Results 1 – 25 of 87) sorted by relevance

1234

/third_party/skia/gm/
Dxfermodeimagefilter.cpp49 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 …]
Dtexelsubset.cpp81 GetResourceAsBitmap("images/mandrill_128.png", &fBitmap); in onOnceBeforeDraw()
83 fBitmap.extractSubset(&fBitmap, SkIRect::MakeSize(fBitmap.dimensions()).makeInset(0, 20)); in onOnceBeforeDraw()
84 SkASSERT(fBitmap.dimensions() == kImageSize); in onOnceBeforeDraw()
99 auto view = std::get<0>(GrMakeCachedBitmapProxyView(rContext, fBitmap, mipmapped)); in onDraw()
109 texelSubset = SkIRect::MakeXYWH(fBitmap.width()/3 - 1, 2*fBitmap.height()/5 - 1, in onDraw()
110 fBitmap.width()/4 + 2, fBitmap.height()/5 + 2); in onDraw()
112 texelSubset = SkIRect::MakeXYWH( fBitmap.width()/8 - 1, fBitmap.height()/7 - 1, in onDraw()
113 3*fBitmap.width()/5 + 2, 4*fBitmap.height()/5 + 2); in onDraw()
130 fBitmap.extractSubset(&subsetBmp, texelSubset); in onDraw()
134 SkRect localRect = SkRect::Make(fBitmap.bounds()).makeOutset(kDrawPad, kDrawPad); in onDraw()
[all …]
Dtileimagefilter.cpp50 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
/third_party/flutter/skia/gm/
Dxfermodeimagefilter.cpp49 fBitmap = ToolUtils::create_string_bitmap(80, 80, 0xD000D000, 15, 65, 96, "e"); in onOnceBeforeDraw()
96 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw()
97 x += fBitmap.width() + MARGIN; in onDraw()
98 if (x + fBitmap.width() > WIDTH) { in onDraw()
100 y += fBitmap.height() + MARGIN; in onDraw()
105 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw()
106 x += fBitmap.width() + MARGIN; in onDraw()
107 if (x + fBitmap.width() > WIDTH) { in onDraw()
109 y += fBitmap.height() + MARGIN; in onDraw()
113 DrawClippedBitmap(canvas, fBitmap, paint, x, y); in onDraw()
[all …]
Dtexturedomaineffect.cpp76 fBitmap.allocN32Pixels(kTargetWidth, kTargetHeight); in onOnceBeforeDraw()
77 SkCanvas canvas(fBitmap); in onOnceBeforeDraw()
109 proxy = proxyProvider->createProxyFromBitmap(fBitmap, mipMapped); in onDraw()
122 fBitmap.bounds(), in onDraw()
123 SkIRect::MakeXYWH(fBitmap.width() / 4 - 1, fBitmap.height() / 4 - 1, in onDraw()
124 fBitmap.width() / 2 + 2, fBitmap.height() / 2 + 2), in onDraw()
127 SkRect renderRect = SkRect::Make(fBitmap.bounds()); in onDraw()
170 SkBitmap fBitmap; member in skiagm::TextureDomainEffect
Dtileimagefilter.cpp50 fBitmap = SkImage::MakeFromBitmap( in onOnceBeforeDraw()
70 sk_sp<SkImage> image = (i & 0x01) ? fCheckerboard : fBitmap; in onDraw()
86 canvas->drawImage(fBitmap.get(), 0, 0, &paint); in onDraw()
104 SkRect srcRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width()), in onDraw()
105 SkIntToScalar(fBitmap->height())); in onDraw()
106 SkRect dstRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width() * 2), in onDraw()
107 SkIntToScalar(fBitmap->height() * 2)); in onDraw()
117 canvas->drawImage(fBitmap.get(), 0, 0); in onDraw()
142 sk_sp<SkImage> fBitmap, fCheckerboard; member in skiagm::TileImageFilterGM
Dmorphology.cpp40 fBitmap.allocN32Pixels(135, 135); in onOnceBeforeDraw()
41 SkCanvas canvas(fBitmap); in onOnceBeforeDraw()
59 SkIntToScalar(fBitmap.width()), SkIntToScalar(fBitmap.height()))); in drawClippedBitmap()
60 canvas->drawBitmap(fBitmap, 0, 0, &paint); in drawClippedBitmap()
94 SkBitmap fBitmap; member in skiagm::MorphologyGM
/third_party/skia/src/image/
DSkSurface_Raster.cpp31 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 …]
DSkImage_Raster.cpp86 const SkBitmap* onPeekBitmap() const override { return &fBitmap; } in onPeekBitmap()
91 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } in getPixelRef()
98 , fBitmap(bm) { in SkImage_Raster()
99 SkASSERT(bitmapMayBeMutable || fBitmap.isImmutable()); in SkImage_Raster()
112 SkASSERT(fBitmap.pixelRef()); in notifyAddedToRasterCache()
113 fBitmap.pixelRef()->notifyAddedToCache(); in notifyAddedToRasterCache()
122 bool onHasMipmaps() const override { return SkToBool(fBitmap.fMips); } in onHasMipmaps()
124 SkMipmap* onPeekMips() const override { return fBitmap.fMips.get(); } in onPeekMips()
127 auto img = new SkImage_Raster(fBitmap); in onMakeWithMipmaps()
129 img->fBitmap.fMips = std::move(mips); in onMakeWithMipmaps()
[all …]
/third_party/flutter/skia/src/image/
DSkSurface_Raster.cpp31 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 …]
DSkImage_Raster.cpp77 const SkBitmap* onPeekBitmap() const override { return &fBitmap; } in onPeekBitmap()
87 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } in getPixelRef()
94 , fBitmap(bm) { in SkImage_Raster()
95 SkASSERT(bitmapMayBeMutable || fBitmap.isImmutable()); in SkImage_Raster()
108 SkASSERT(fBitmap.pixelRef()); in notifyAddedToRasterCache()
109 fBitmap.pixelRef()->notifyAddedToCache(); in notifyAddedToRasterCache()
120 SkBitmap fBitmap; member in SkImage_Raster
143 fBitmap.installPixels(info, addr, rowBytes, release_data, data.release()); in SkImage_Raster()
144 fBitmap.setImmutable(); in SkImage_Raster()
155 SkBitmap shallowCopy(fBitmap); in onReadPixels()
[all …]
/third_party/skia/src/effects/
DSkTableColorFilter.cpp25 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 …]
/third_party/flutter/skia/samplecode/
DSampleUnpremul.cpp89 header.appendf(" [%dx%d] %s", fBitmap.width(), fBitmap.height(), in onDrawContent()
109 bm.allocN32Pixels(fBitmap.width(), fBitmap.height()); in onDrawContent()
110 for (int i = 0; i < fBitmap.width(); ++i) { in onDrawContent()
111 for (int j = 0; j < fBitmap.height(); ++j) { in onDrawContent()
112 *bm.getAddr32(i, j) = premultiply_unpmcolor(*fBitmap.getAddr32(i, j)); in onDrawContent()
117 canvas->drawBitmap(fBitmap, 0, 0); in onDrawContent()
126 SkBitmap fBitmap; member in UnpremulView
153 fDecodeSucceeded = decode_file(fCurrFile.c_str(), &fBitmap, kN32_SkColorType, !fPremul); in decodeCurrFile()
DSampleBitmapRect.cpp65 SkBitmap fBitmap; member in BitmapRectView
71 make_bitmap(&fBitmap); in onOnceBeforeDraw()
83 canvas->drawBitmap(fBitmap, 0, 0, &paint); in onDrawContent()
88 canvas->drawBitmapRect(fBitmap, srcR, fDstR[i], &paint, in onDrawContent()
124 SkBitmap fBitmap; member in BitmapRectView2
134 make_big_bitmap(&fBitmap); in onOnceBeforeDraw()
135 fLimitR = SkRect::Make(fBitmap.dimensions()); in onOnceBeforeDraw()
145 canvas->drawBitmapRect(fBitmap, fSrcR, fDstR[i], &paint, in onDrawContent()
/third_party/skia/tools/skdiff/
Dskdiff_utils.cpp57 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 …]
Dskdiff.cpp159 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()
/third_party/flutter/skia/tools/skdiff/
Dskdiff_utils.cpp57 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 …]
Dskdiff.cpp159 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()
/third_party/skia/src/android/
DSkAnimatedImage.cpp34 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 …]
/third_party/flutter/skia/src/android/
DSkAnimatedImage.cpp48 if (!image->fDisplayFrame.fBitmap.getPixels()) { in Make()
67 if (!image->fDisplayFrame.fBitmap.getPixels()) { in Make()
90 if (!fDecodingFrame.fBitmap.tryAllocPixels(fDecodeInfo)) { in SkAnimatedImage()
114 if (fBitmap.getPixels()) { in init()
115 if (fBitmap.pixelRef()->unique()) { in init()
116 SkAssertResult(fBitmap.setAlphaType(info.alphaType())); in init()
129 memcpy(tmp.getPixels(), fBitmap.getPixels(), fBitmap.computeByteSize()); in init()
131 swap(tmp, fBitmap); in init()
136 return fBitmap.tryAllocPixels(info); in init()
140 if (!dst->init(fBitmap.info(), OnInit::kNoRestore)) { in copyTo()
[all …]
/third_party/flutter/skia/bench/
DBitmapRectBench.cpp43 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()
DRepeatTileBench.cpp39 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()
/third_party/skia/bench/
DRepeatTileBench.cpp39 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()
/third_party/flutter/skia/tests/
DRecordingXfermodeTest.cpp81 fBitmap.allocPixels(imageInfo); in BitmapBackedCanvasStrategy()
86 SkCanvas canvas(fBitmap); in recordAndReplay()
91 return fBitmap; in recordAndReplay()
95 SkBitmap fBitmap; member in __anon7a075a7a0111::BitmapBackedCanvasStrategy
104 fBitmap.allocPixels(imageInfo); in PictureStrategy()
120 SkCanvas replayCanvas(fBitmap); in recordAndReplay()
124 return fBitmap; in recordAndReplay()
128 SkBitmap fBitmap; member in __anon7a075a7a0111::PictureStrategy
/third_party/skia/tests/
DRecordingXfermodeTest.cpp83 fBitmap.allocPixels(imageInfo); in BitmapBackedCanvasStrategy()
88 SkCanvas canvas(fBitmap); in recordAndReplay()
93 return fBitmap; in recordAndReplay()
97 SkBitmap fBitmap; member in __anon7a2748650111::BitmapBackedCanvasStrategy
106 fBitmap.allocPixels(imageInfo); in PictureStrategy()
122 SkCanvas replayCanvas(fBitmap); in recordAndReplay()
126 return fBitmap; in recordAndReplay()
130 SkBitmap fBitmap; member in __anon7a2748650111::PictureStrategy

1234