MCPcopy Create free account
hub / github.com/Tencent/tgfx / Compare

Method Compare

test/src/utils/Baseline.cpp:108–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108bool Baseline::Compare(std::shared_ptr<PixelBuffer> pixelBuffer, const std::string& key) {
109 if (pixelBuffer == nullptr) {
110 return false;
111 }
112 auto pixels = pixelBuffer->lockPixels();
113 Pixmap pixmap(pixelBuffer->info(), pixels);
114 auto result = Baseline::Compare(pixmap, key);
115 pixelBuffer->unlockPixels();
116 return result;
117}
118
119bool Baseline::Compare(const std::shared_ptr<Surface> surface, const std::string& key) {
120 if (surface == nullptr) {

Callers

nothing calls this directly

Calls 15

CompareFunction · 0.85
DumpMD5Function · 0.85
SaveImageFunction · 0.85
CompareVersionAndMd5Function · 0.85
RemoveImageFunction · 0.85
writablePixelsMethod · 0.80
minRowBytesMethod · 0.80
pixelsMethod · 0.80
lockPixelsMethod · 0.45
unlockPixelsMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected