Home
last modified time | relevance | path

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

12345

/external/skqp/gm/
Dxfermodeimagefilter.cpp38 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 …]
Dtileimagefilter.cpp38 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
/external/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 …]
Dtexelsubset.cpp72 GetResourceAsBitmap("images/mandrill_128.png", &fBitmap); in onOnceBeforeDraw()
74 fBitmap.extractSubset(&fBitmap, SkIRect::MakeSize(fBitmap.dimensions()).makeInset(0, 20)); in onOnceBeforeDraw()
75 SkASSERT(fBitmap.dimensions() == kImageSize); in onOnceBeforeDraw()
83 GrBitmapTextureMaker maker(context, fBitmap); in onDraw()
94 texelSubset = SkIRect::MakeXYWH(fBitmap.width()/3 - 1, 2*fBitmap.height()/5 - 1, in onDraw()
95 fBitmap.width()/4 + 2, fBitmap.height()/5 + 2); in onDraw()
97 texelSubset = SkIRect::MakeXYWH( fBitmap.width()/8 - 1, fBitmap.height()/7 - 1, in onDraw()
98 3*fBitmap.width()/5 + 2, 4*fBitmap.height()/5 + 2); in onDraw()
115 fBitmap.extractSubset(&subsetBmp, texelSubset); in onDraw()
120 SkRect localRect = SkRect::Make(fBitmap.bounds()).makeOutset(kDrawPad, kDrawPad); in onDraw()
[all …]
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
/external/skqp/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.cpp76 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/
DSoftwareRenderer.cpp47 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/
DSkSurface_Raster.cpp31 SkBitmap fBitmap; member in SkSurface_Raster
75 fBitmap.installPixels(info, pixels, rb, releaseProc, context); in SkSurface_Raster()
83 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster()
84 fBitmap.setPixelRef(std::move(pr), 0, 0); in SkSurface_Raster()
88 SkCanvas* SkSurface_Raster::onNewCanvas() { return new SkCanvas(fBitmap, this->props()); } in onNewCanvas()
96 canvas->drawBitmap(fBitmap, x, y, paint); in onDraw()
101 SkASSERT(SkIRect::MakeWH(fBitmap.width(), fBitmap.height()).contains(*subset)); in onNewImageSnapshot()
103 dst.allocPixels(fBitmap.info().makeDimensions(subset->size())); in onNewImageSnapshot()
104 SkAssertResult(fBitmap.readPixels(dst.pixmap(), subset->left(), subset->top())); in onNewImageSnapshot()
113 if (SkPixelRef* pr = fBitmap.pixelRef()) { in onNewImageSnapshot()
[all …]
DSkImage_Raster.cpp85 const SkBitmap* onPeekBitmap() const override { return &fBitmap; } in onPeekBitmap()
95 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } in getPixelRef()
102 , fBitmap(bm) { in SkImage_Raster()
103 SkASSERT(bitmapMayBeMutable || fBitmap.isImmutable()); in SkImage_Raster()
116 SkASSERT(fBitmap.pixelRef()); in notifyAddedToRasterCache()
117 fBitmap.pixelRef()->notifyAddedToCache(); in notifyAddedToRasterCache()
128 SkBitmap fBitmap; member in SkImage_Raster
151 fBitmap.installPixels(info, addr, rowBytes, release_data, data.release()); in SkImage_Raster()
152 fBitmap.setImmutable(); in SkImage_Raster()
163 SkBitmap shallowCopy(fBitmap); in onReadPixels()
[all …]
/external/skqp/src/android/
DSkAnimatedImage.cpp37 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/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 …]
/external/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()
/external/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()
/external/skqp/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()
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 …]
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()
/external/skqp/samplecode/
DSampleUnpremul.cpp99 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/gpu/
DGrBitmapTextureMaker.cpp32 , fBitmap(bitmap) in GrBitmapTextureMaker()
53 auto colorType = SkColorTypeToGrColorType(fBitmap.colorType()); in refOriginalTextureProxyView()
65 if (this->colorType() != SkColorTypeToGrColorType(fBitmap.info().colorType())) { in refOriginalTextureProxyView()
68 if (!copy8888.tryAllocPixels(fBitmap.info().makeColorType(kRGBA_8888_SkColorType)) || in refOriginalTextureProxyView()
69 !fBitmap.readPixels(copy8888.pixmap())) { in refOriginalTextureProxyView()
77 fBitmap, willBeMipped ? GrMipMapped::kYes : GrMipMapped::kNo, fFit); in refOriginalTextureProxyView()
86 fOriginalKey, proxyProvider->contextID(), fBitmap.pixelRef()); in refOriginalTextureProxyView()
99 GrColorType srcColorType = SkColorTypeToGrColorType(fBitmap.colorType()); in refOriginalTextureProxyView()
114 fBitmap.pixelRef()); in refOriginalTextureProxyView()
133 GrInstallBitmapUniqueKeyInvalidator(copyKey, contextUniqueID, fBitmap.pixelRef()); in didCacheCopy()
/external/skqp/src/gpu/
DGrBitmapTextureMaker.cpp24 , 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/
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()
/external/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()
/external/skia/modules/particles/src/
DSkParticleBinding.cpp208 , fBitmap(bitmap) { in SkBitmapExternalValue()
219 int x = SkTPin(static_cast<int>(arguments[0] * fBitmap.width()), 0, fBitmap.width() - 1); in call()
220 int y = SkTPin(static_cast<int>(arguments[1] * fBitmap.height()), 0, fBitmap.height() - 1); in call()
221 float* p = static_cast<float*>(fBitmap.getAddr(x, y)); in call()
226 SkBitmap fBitmap; member in SkBitmapExternalValue
246 new SkBitmapExternalValue(fName.c_str(), compiler, fBitmap)); in toValue()
253 fBitmap.allocPixels(image->imageInfo().makeColorType(kRGBA_F32_SkColorType)); in prepare()
254 image->readPixels(fBitmap.pixmap(), 0, 0); in prepare()
259 fBitmap.allocPixels(SkImageInfo::Make(1, 1, kRGBA_F32_SkColorType, kPremul_SkAlphaType)); in prepare()
260 fBitmap.eraseColor(SK_ColorWHITE); in prepare()
[all …]

12345