I think its a bit more flexible not to force the use of the rvalue.
void begin(std::unordered_set<graphics::Renderable::ID> renderables_not_to_decorate) const;
begin(std::move(a)) would still use the move constructor
#2
193 + virtual std::shared_ptr<BufferWriter> create_buffer_writer() = 0;
I had to change to make_* over in my MP :)
<side note> I think that the "display stuff" should get split out of Platform into its own interface to get rid of NativePlatform.
A continuation from the superseded discussion, but a char* and a size seems like it puts more burden on the caller of the interface to make sure that raw data in the char* matches what the buffer expects. (An example of this is line 1059 where we throw if the size is incorrect) The ideal is probably to see something like:
write(Buffer&, std::vector<Pixels>)
where the write function figures out how to get the pixels into that buffer (adjust for stride, format differences, etc etc)
#4
711 + auto mga_buffer = std::static_pointer_cast<mga::Buffer>(buffer);
needs removal.
Somewhat related, but write() could use a Buffer& instead of a shared_ptr<Buffer>
#5
716 + int usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN;
minor point, but we just need SW_WRITE_OFTEN
#6
696 +mga::AndroidBufferWriter::AndroidBufferWriter()
We recreate the gralloc module in the constructor here, could reuse a single instance.
#7
698 + int err;
699 +
could use auto and get rid of these lines
#8
963 +
2701
whitespace introduction
#9
The 64x64x4 still increases mir's memory and installation footprint a fair amount, maybe we could programatically create a smaller image?
#1 :unordered_ set<graphics: :Renderable: :ID> &&renderables_ not_to_ decorate) const;
86 + void begin(std:
I think its a bit more flexible not to force the use of the rvalue. :unordered_ set<graphics: :Renderable: :ID> renderables_ not_to_ decorate) const;
void begin(std:
begin(std::move(a)) would still use the move constructor
#2 ptr<BufferWrite r> create_ buffer_ writer( ) = 0;
193 + virtual std::shared_
I had to change to make_* over in my MP :)
<side note> I think that the "display stuff" should get split out of Platform into its own interface to get rid of NativePlatform.
#3 :shared_ ptr<Buffer> const& buffer, unsigned char const* data, size_t size) = 0;
167 + virtual void write(std:
A continuation from the superseded discussion, but a char* and a size seems like it puts more burden on the caller of the interface to make sure that raw data in the char* matches what the buffer expects. (An example of this is line 1059 where we throw if the size is incorrect) The ideal is probably to see something like: Pixels> )
write(Buffer&, std::vector<
where the write function figures out how to get the pixels into that buffer (adjust for stride, format differences, etc etc)
#4 pointer_ cast<mga: :Buffer> (buffer) ;
711 + auto mga_buffer = std::static_
needs removal.
Somewhat related, but write() could use a Buffer& instead of a shared_ptr<Buffer>
#5 USAGE_SW_ READ_OFTEN | GRALLOC_ USAGE_SW_ WRITE_OFTEN;
716 + int usage = GRALLOC_
minor point, but we just need SW_WRITE_OFTEN
#6 fferWriter: :AndroidBufferW riter()
696 +mga::AndroidBu
We recreate the gralloc module in the constructor here, could reuse a single instance.
#7
698 + int err;
699 +
could use auto and get rid of these lines
#8
963 +
2701
whitespace introduction
#9
The 64x64x4 still increases mir's memory and installation footprint a fair amount, maybe we could programatically create a smaller image?