MCPcopy Create free account
hub / github.com/dejwk/roo_display / read

Method read

test/streamable_test.cpp:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 : pixels_(std::move(pixels)), run_lengths_(std::move(run_lengths)) {}
25
26 void read(Color* buf, uint16_t size, uint32_t& run_length) override {
27 EXPECT_LE(idx_ + size, pixels_.size());
28 memcpy(buf, pixels_.data() + idx_, size * sizeof(Color));
29 idx_ += size;
30 if (read_count_ < run_lengths_.size()) {
31 run_length = run_lengths_[read_count_++];
32 } else {
33 run_length = 0;
34 }
35 }
36
37 void skip(uint32_t count) override {
38 ++skip_calls_;

Callers 1

TESTFunction · 0.45

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected