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
945e8d49
Commit
945e8d49
authored
Dec 28, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
parent
44bd5a73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/xcshareddata/xcschemes/AdvancedEffects.xcscheme
...xcodeproj/xcshareddata/xcschemes/AdvancedEffects.xcscheme
+0
-7
ios/GLCanvas.m
ios/GLCanvas.m
+8
-5
No files found.
Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/xcshareddata/xcschemes/AdvancedEffects.xcscheme
View file @
945e8d49
...
@@ -85,13 +85,6 @@
...
@@ -85,13 +85,6 @@
ReferencedContainer =
"container:AdvancedEffects.xcodeproj"
>
ReferencedContainer =
"container:AdvancedEffects.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildableProductRunnable>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key =
"NSZombieEnabled"
value =
"YES"
isEnabled =
"YES"
>
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
<AdditionalOptions>
</AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
</LaunchAction>
...
...
ios/GLCanvas.m
View file @
945e8d49
...
@@ -301,7 +301,6 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -301,7 +301,6 @@ RCT_NOT_IMPLEMENTED(-init)
contentData
[
i
]
=
imgData
;
contentData
[
i
]
=
imgData
;
}
}
_contentData
=
contentData
;
_contentData
=
contentData
;
_deferredRendering
=
true
;
[
self
setNeedsDisplay
];
[
self
setNeedsDisplay
];
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
}
}
...
@@ -350,16 +349,17 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -350,16 +349,17 @@ RCT_NOT_IMPLEMENTED(-init)
BOOL
needsDeferredRendering
=
_nbContentTextures
>
0
&&
!
_autoRedraw
;
BOOL
needsDeferredRendering
=
_nbContentTextures
>
0
&&
!
_autoRedraw
;
if
(
needsDeferredRendering
&&
!
_deferredRendering
)
{
if
(
needsDeferredRendering
&&
!
_deferredRendering
)
{
_deferredRendering
=
true
;
[
self
performSelectorOnMainThread
:
@selector
(
syncContentData
)
withObject
:
nil
waitUntilDone
:
NO
];
[
self
performSelectorOnMainThread
:
@selector
(
syncContentData
)
withObject
:
nil
waitUntilDone
:
NO
];
}
}
else
{
else
{
RCT_PROFILE_BEGIN_EVENT
(
0
,
@"GLCanvas render"
,
nil
);
[
self
render
];
[
self
render
];
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
_deferredRendering
=
false
;
_deferredRendering
=
false
;
if
(
_captureFrameRequested
)
{
if
(
_captureFrameRequested
)
{
_captureFrameRequested
=
false
;
_captureFrameRequested
=
false
;
// FIXME: might use performSelectorOnMainThread as well
dispatch_async
(
dispatch_get_main_queue
(),
^
{
// snapshot not allowed in render tick. defer it.
dispatch_async
(
dispatch_get_main_queue
(),
^
{
// snapshot not allowed in render tick. defer it.
if
(
!
weakSelf
)
return
;
if
(
!
weakSelf
)
return
;
UIImage
*
frameImage
=
[
weakSelf
snapshot
];
UIImage
*
frameImage
=
[
weakSelf
snapshot
];
...
@@ -377,10 +377,11 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -377,10 +377,11 @@ RCT_NOT_IMPLEMENTED(-init)
{
{
GLRenderData
*
rd
=
_renderData
;
GLRenderData
*
rd
=
_renderData
;
if
(
!
rd
)
return
;
if
(
!
rd
)
return
;
RCT_PROFILE_BEGIN_EVENT
(
0
,
@"GLCanvas render"
,
nil
);
CGFloat
scale
=
RCTScreenScale
();
@autoreleasepool
{
@autoreleasepool
{
CGFloat
scale
=
RCTScreenScale
();
void
(
^
recDraw
)
(
GLRenderData
*
renderData
);
void
(
^
recDraw
)
(
GLRenderData
*
renderData
);
__block
__weak
void
(
^
weak_recDraw
)
(
GLRenderData
*
renderData
);
__block
__weak
void
(
^
weak_recDraw
)
(
GLRenderData
*
renderData
);
weak_recDraw
=
recDraw
=
^
void
(
GLRenderData
*
renderData
)
{
weak_recDraw
=
recDraw
=
^
void
(
GLRenderData
*
renderData
)
{
...
@@ -437,6 +438,8 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -437,6 +438,8 @@ RCT_NOT_IMPLEMENTED(-init)
[
self
dispatchOnLoad
];
[
self
dispatchOnLoad
];
}
}
}
}
RCT_PROFILE_END_EVENT
(
0
,
@"gl"
,
nil
);
}
}
//// utility methods
//// utility methods
...
...
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