support for premultipled alpha
This commit is contained in:
+1
-3
@@ -29,9 +29,7 @@
|
||||
#include "effects/internal/paneffect.h"
|
||||
#include "effects/internal/shakeeffect.h"
|
||||
#include "effects/internal/cornerpineffect.h"
|
||||
#ifndef NOVST
|
||||
#include "effects/internal/vsthost.h"
|
||||
#endif
|
||||
#include "effects/internal/fillleftrighteffect.h"
|
||||
#include "effects/internal/frei0reffect.h"
|
||||
|
||||
@@ -754,7 +752,7 @@ GLuint Effect::process_superimpose(double timecode) {
|
||||
int height = parent_clip->getHeight();
|
||||
|
||||
if (width != img.width() || height != img.height()) {
|
||||
img = QImage(width, height, QImage::Format_RGBA8888);
|
||||
img = QImage(width, height, QImage::Format_RGBA8888_Premultiplied);
|
||||
recreate_texture = true;
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -11,7 +11,15 @@ extern "C" {
|
||||
|
||||
#include "project/clip.h"
|
||||
|
||||
Footage::Footage() : ready(false), preview_gen(nullptr), invalid(false), in(0), out(0), speed(1.0) {
|
||||
Footage::Footage() :
|
||||
ready(false),
|
||||
preview_gen(nullptr),
|
||||
invalid(false),
|
||||
in(0),
|
||||
out(0),
|
||||
speed(1.0),
|
||||
alpha_is_premultiplied(false)
|
||||
{
|
||||
ready_lock.lock();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ struct Footage {
|
||||
bool ready;
|
||||
bool invalid;
|
||||
double speed;
|
||||
bool alpha_is_premultiplied;
|
||||
|
||||
PreviewGenerator* preview_gen;
|
||||
QMutex ready_lock;
|
||||
|
||||
+10
-2
@@ -787,7 +787,7 @@ void SetAutoscaleAction::undo() {
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
clips.at(i)->autoscale = !clips.at(i)->autoscale;
|
||||
}
|
||||
panel_sequence_viewer->viewer_widget->update();
|
||||
panel_sequence_viewer->viewer_widget->frame_update();
|
||||
mainWindow->setWindowModified(old_project_changed);
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ void SetAutoscaleAction::redo() {
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
clips.at(i)->autoscale = !clips.at(i)->autoscale;
|
||||
}
|
||||
panel_sequence_viewer->viewer_widget->update();
|
||||
panel_sequence_viewer->viewer_widget->frame_update();
|
||||
mainWindow->setWindowModified(true);
|
||||
}
|
||||
|
||||
@@ -1272,3 +1272,11 @@ void RefreshClips::redo() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateViewer::undo() {
|
||||
redo();
|
||||
}
|
||||
|
||||
void UpdateViewer::redo() {
|
||||
panel_sequence_viewer->viewer_widget->frame_update();
|
||||
}
|
||||
|
||||
@@ -644,4 +644,10 @@ private:
|
||||
Media* media;
|
||||
};
|
||||
|
||||
class UpdateViewer : public QUndoCommand {
|
||||
public:
|
||||
void undo();
|
||||
void redo();
|
||||
};
|
||||
|
||||
#endif // UNDO_H
|
||||
|
||||
Reference in New Issue
Block a user