Commit b86f8ddb authored by Agata Cacko's avatar Agata Cacko Committed by Dmitry Kazakov
Browse files

Fix building of MyPaint plugin

It also used KisPrecisePaintDeviceWrapper and should have been ported to
use KisOverlayPaintDeviceWrapper.
parent a95674f4
...@@ -34,11 +34,11 @@ KisMyPaintSurface::KisMyPaintSurface(KisPainter *painter, KisPaintDeviceSP paint ...@@ -34,11 +34,11 @@ KisMyPaintSurface::KisMyPaintSurface(KisPainter *painter, KisPaintDeviceSP paint
, m_image(image) , m_image(image)
, m_precisePainterWrapper(painter->device()) , m_precisePainterWrapper(painter->device())
, m_dab(m_precisePainterWrapper.createPreciseCompositionSourceDevice()) , m_dab(m_precisePainterWrapper.createPreciseCompositionSourceDevice())
, m_tempPainter(new KisPainter(m_precisePainterWrapper.preciseDevice())) , m_tempPainter(new KisPainter(m_precisePainterWrapper.overlay()))
, m_backgroundPainter(new KisPainter(m_precisePainterWrapper.createPreciseCompositionSourceDevice())) , m_backgroundPainter(new KisPainter(m_precisePainterWrapper.createPreciseCompositionSourceDevice()))
{ {
m_blendDevice = KisFixedPaintDeviceSP(new KisFixedPaintDevice(m_precisePainterWrapper.preciseColorSpace())); m_blendDevice = KisFixedPaintDeviceSP(new KisFixedPaintDevice(m_precisePainterWrapper.overlayColorSpace()));
m_backgroundPainter->setCompositeOp(COMPOSITE_COPY); m_backgroundPainter->setCompositeOp(COMPOSITE_COPY);
m_backgroundPainter->setOpacity(OPACITY_OPAQUE_U8); m_backgroundPainter->setOpacity(OPACITY_OPAQUE_U8);
...@@ -53,7 +53,7 @@ KisMyPaintSurface::KisMyPaintSurface(KisPainter *painter, KisPaintDeviceSP paint ...@@ -53,7 +53,7 @@ KisMyPaintSurface::KisMyPaintSurface(KisPainter *painter, KisPaintDeviceSP paint
m_surface->draw_dab = this->draw_dab; m_surface->draw_dab = this->draw_dab;
m_surface->get_color = this->get_color; m_surface->get_color = this->get_color;
m_surface->destroy = destroy_internal_surface_callback; m_surface->destroy = destroy_internal_surface_callback;
m_surface->bitDepth = m_precisePainterWrapper.preciseColorSpace()->channels()[0]->channelValueType(); m_surface->bitDepth = m_precisePainterWrapper.overlayColorSpace()->channels()[0]->channelValueType();
} }
KisMyPaintSurface::~KisMyPaintSurface() KisMyPaintSurface::~KisMyPaintSurface()
...@@ -270,7 +270,7 @@ void KisMyPaintSurface::getColorImpl(MyPaintSurface *self, float x, float y, flo ...@@ -270,7 +270,7 @@ void KisMyPaintSurface::getColorImpl(MyPaintSurface *self, float x, float y, flo
quint32 sum_weight = 0.0f; quint32 sum_weight = 0.0f;
m_precisePainterWrapper.readRect(dabRectAligned); m_precisePainterWrapper.readRect(dabRectAligned);
KisPaintDeviceSP activeDev = m_precisePainterWrapper.preciseDevice(); KisPaintDeviceSP activeDev = m_precisePainterWrapper.overlay();
if(m_image) { if(m_image) {
//m_image->blockUpdates(); //m_image->blockUpdates();
m_backgroundPainter->device()->clear(); m_backgroundPainter->device()->clear();
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <KoColor.h> #include <KoColor.h>
#include <kis_marker_painter.h> #include <kis_marker_painter.h>
#include <kis_sequential_iterator.h> #include <kis_sequential_iterator.h>
#include <KisPrecisePaintDeviceWrapper.h> #include <KisOverlayPaintDeviceWrapper.h>
#include <libmypaint/mypaint-brush.h> #include <libmypaint/mypaint-brush.h>
#include <libmypaint/mypaint-surface.h> #include <libmypaint/mypaint-surface.h>
...@@ -81,7 +81,7 @@ private: ...@@ -81,7 +81,7 @@ private:
KisPaintDeviceSP m_imageDevice; KisPaintDeviceSP m_imageDevice;
MyPaintSurfaceInternal *m_surface; MyPaintSurfaceInternal *m_surface;
KisImageSP m_image; KisImageSP m_image;
KisPrecisePaintDeviceWrapper m_precisePainterWrapper; KisOverlayPaintDeviceWrapper m_precisePainterWrapper;
KisPaintDeviceSP m_dab; KisPaintDeviceSP m_dab;
QScopedPointer<KisPainter> m_tempPainter; QScopedPointer<KisPainter> m_tempPainter;
QScopedPointer<KisPainter> m_backgroundPainter; QScopedPointer<KisPainter> m_backgroundPainter;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment