-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Protected surfaces #1539
base: master
Are you sure you want to change the base?
Protected surfaces #1539
Conversation
Can this be reviewed and merged? |
Code sync'ed with latest |
Can this be reviewed and merged? |
@@ -914,8 +914,6 @@ Canvas::resurface(Local<Object> canvas) { | |||
Nan::HandleScope scope; | |||
Local<Value> context; | |||
|
|||
backend()->recreateSurface(); |
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.
Would you mind explaining this change? I'm not to familiar with this part of the code 😅
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.
I don't remember the exact details, but reviewing the PR, seems to me like a bug, because recreateSurface()
it's not being called anywhere else...
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.
Maybe best to add it back?
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.
Maybe, or test it first as is, to be sure if it crash or fails.
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.
Sorry for not getting to this earlier! Just one small comment, otherwise it looks very good 👍
Thank you! :-) |
64ed3d8
to
ff0f2ab
Compare
This abstract and protect the actual Cairo surfaces, making them an implementation detail of the backends, preventing to be created or destroyed from outside. This allow for greater isolation of concepts, allowing to access to the actual Cairo surface just only by using the
getSurface()
method, preventing any other direct access.