Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gl-react-native-v2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
gl-react-native-v2
Commits
107e6aaf
Commit
107e6aaf
authored
Dec 28, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve perfs of autoRedraw
parent
fd28f9e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
ios/GLCanvas.m
ios/GLCanvas.m
+16
-3
No files found.
ios/GLCanvas.m
View file @
107e6aaf
...
...
@@ -111,11 +111,13 @@ RCT_NOT_IMPLEMENTED(-init)
-
(
void
)
setAutoRedraw
:(
BOOL
)
autoRedraw
{
_autoRedraw
=
autoRedraw
;
if
(
autoRedraw
)
{
if
(
!
animationTimer
)
animationTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1
.
0
/
60
.
0
target:
self
selector:
@selector
(
setNeedsDisplay
)
selector:
@selector
(
autoRedrawUpdate
)
userInfo:
nil
repeats:
YES
];
}
...
...
@@ -332,6 +334,17 @@ RCT_NOT_IMPLEMENTED(-init)
//// Draw
-
(
void
)
autoRedrawUpdate
{
if
([
self
haveRemainingToPreload
])
{
return
;
}
if
([
_nbContentTextures
intValue
]
>
0
)
{
[
self
syncContentData
];
}
[
self
setNeedsDisplay
];
}
-
(
void
)
drawRect
:(
CGRect
)
rect
{
self
.
layer
.
opaque
=
_opaque
;
...
...
@@ -352,7 +365,7 @@ RCT_NOT_IMPLEMENTED(-init)
bool
willRender
=
!
_deferredRendering
;
if
([
_nbContentTextures
intValue
]
>
0
)
{
if
([
_nbContentTextures
intValue
]
>
0
&&
!
_autoRedraw
)
{
_deferredRendering
=
true
;
[
self
performSelectorOnMainThread
:
@selector
(
syncContentData
)
withObject
:
nil
waitUntilDone
:
NO
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment