MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setPixels

Method setPixels

snap_drawing/test/utils/TestBitmap.cpp:54–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void TestBitmap::setPixels(const std::initializer_list<Color>& pixels) {
55 SC_ASSERT(pixels.size() == static_cast<size_t>(_width) * _height);
56 std::memcpy(_pixels.data(), pixels.begin(), pixels.size() * sizeof(Color));
57}
58
59bool TestBitmap::operator==(const TestBitmap& other) const {
60 if (_width != other._width || _height != other._height) {

Callers 1

TEST_FFunction · 0.80

Calls 3

sizeMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected