-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature alpha mask #111
Feature alpha mask #111
Conversation
26bc8f5
to
05b8910
Compare
src/Layer/PaintNode.cpp
Outdated
auto r = SkRuntimeEffect::MakeForShader(SkString(R"( | ||
uniform shader content; | ||
uniform shader bg; | ||
uniform float2 size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tabs are mixed here.
src/Layer/PaintNode.cpp
Outdated
DEBUG("%s", r.errorText.c_str()); | ||
return nullptr; | ||
} | ||
SkRuntimeShaderBuilder builder(std::move(r.effect)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this builder be static and be initialized only once?
else if (*blurType == BT_Zoom) | ||
DEBUG("Zoom blur has not been implemeted"); | ||
else if (*blurType == BT_Motion) | ||
DEBUG("Zoom blur has not been implemeted"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Motion blur has not been implemented
else if (*blurType == BT_Background) | ||
painter.blurBackgroundEnd(); | ||
else if (*blurType == BT_Zoom) | ||
DEBUG("Zoom blur has not been implemeted"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo. implemented
std::ofstream ofs(*m_skpPath); | ||
if (ofs.is_open()) | ||
{ | ||
ofs.write((char*)data->data(), data->size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may have potential issue with wasm version.
Description
Add support for alpha mask and background blur