Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/scene_qpainter_drm_backend.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 57 | for (auto it = m_outputs.begin(); it != m_outputs.end(); ++it) { | |||
---|---|---|---|---|---|
59 | delete (*it).buffer[1]; | 59 | delete (*it).buffer[1]; | ||
60 | } | 60 | } | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | void DrmQPainterBackend::initOutput(DrmOutput *output) | 63 | void DrmQPainterBackend::initOutput(DrmOutput *output) | ||
64 | { | 64 | { | ||
65 | Output o; | 65 | Output o; | ||
66 | auto initBuffer = [&o, output, this] (int index) { | 66 | auto initBuffer = [&o, output, this] (int index) { | ||
67 | o.buffer[index] = m_backend->createBuffer(output->size()); | 67 | o.buffer[index] = m_backend->createBuffer(output->pixelSize()); | ||
romangg: Divding above through scale and then multiplying again here and in blank() could lead to… | |||||
68 | o.buffer[index]->map(); | 68 | o.buffer[index]->map(); | ||
69 | o.buffer[index]->image()->fill(Qt::black); | 69 | o.buffer[index]->image()->fill(Qt::black); | ||
70 | }; | 70 | }; | ||
71 | initBuffer(0); | 71 | initBuffer(0); | ||
72 | initBuffer(1); | 72 | initBuffer(1); | ||
73 | o.output = output; | 73 | o.output = output; | ||
74 | m_outputs << o; | 74 | m_outputs << o; | ||
75 | } | 75 | } | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
Divding above through scale and then multiplying again here and in blank() could lead to rounding errors.