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
fd28f9e3
Commit
fd28f9e3
authored
Dec 28, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify the logic in drawRect
parent
7a874939
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
ios/GLCanvas.m
ios/GLCanvas.m
+7
-6
No files found.
ios/GLCanvas.m
View file @
fd28f9e3
...
@@ -113,7 +113,6 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -113,7 +113,6 @@ RCT_NOT_IMPLEMENTED(-init)
{
{
if
(
autoRedraw
)
{
if
(
autoRedraw
)
{
if
(
!
animationTimer
)
if
(
!
animationTimer
)
animationTimer
=
// FIXME: can we do better than this?
[
NSTimer
scheduledTimerWithTimeInterval
:
1
.
0
/
60
.
0
[
NSTimer
scheduledTimerWithTimeInterval
:
1
.
0
/
60
.
0
target:
self
target:
self
selector:
@selector
(
setNeedsDisplay
)
selector:
@selector
(
setNeedsDisplay
)
...
@@ -306,6 +305,7 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -306,6 +305,7 @@ RCT_NOT_IMPLEMENTED(-init)
contentData
[
i
]
=
imgData
;
contentData
[
i
]
=
imgData
;
}
}
_contentData
=
contentData
;
_contentData
=
contentData
;
_deferredRendering
=
false
;
[
self
setNeedsDisplay
];
[
self
setNeedsDisplay
];
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
}
}
...
@@ -350,14 +350,15 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -350,14 +350,15 @@ RCT_NOT_IMPLEMENTED(-init)
return
;
return
;
}
}
BOOL
needsDeferredRendering
=
[
_nbContentTextures
intValue
]
>
0
&&
!
_autoRedraw
;
bool
willRender
=
!
_deferredRendering
;
if
(
needsDeferredRendering
&&
!
_deferredRendering
)
{
if
([
_nbContentTextures
intValue
]
>
0
)
{
_deferredRendering
=
true
;
_deferredRendering
=
true
;
[
self
performSelectorOnMainThread
:
@selector
(
syncContentData
)
withObject
:
nil
waitUntilDone
:
NO
];
[
self
performSelectorOnMainThread
:
@selector
(
syncContentData
)
withObject
:
nil
waitUntilDone
:
NO
];
}
}
else
{
if
(
willRender
)
{
[
self
render
];
[
self
render
];
_deferredRendering
=
false
;
if
(
_captureFrameRequested
)
{
if
(
_captureFrameRequested
)
{
_captureFrameRequested
=
false
;
_captureFrameRequested
=
false
;
[
self
performSelectorOnMainThread
:
@selector
(
capture
)
withObject
:
nil
waitUntilDone
:
NO
];
[
self
performSelectorOnMainThread
:
@selector
(
capture
)
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