Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
ed0162ad
Commit
ed0162ad
authored
Aug 24, 2013
by
ozantonkal
Committed by
Ozan Tonkal
Sep 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove reference counting in widgets
parent
08917908
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
48 deletions
+1
-48
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+0
-6
widget.cpp
modules/viz/src/widget.cpp
+1
-42
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
ed0162ad
...
...
@@ -14,9 +14,6 @@ namespace cv
{
public
:
Widget
();
Widget
(
const
Widget
&
other
);
Widget
&
operator
=
(
const
Widget
&
other
);
~
Widget
();
static
Widget
fromPlyFile
(
const
String
&
file_name
);
...
...
@@ -28,9 +25,6 @@ namespace cv
class
Impl
;
Impl
*
impl_
;
friend
struct
WidgetAccessor
;
void
create
();
void
release
();
};
/////////////////////////////////////////////////////////////////////////////
...
...
modules/viz/src/widget.cpp
View file @
ed0162ad
...
...
@@ -7,52 +7,11 @@ class cv::viz::Widget::Impl
{
public
:
vtkSmartPointer
<
vtkProp
>
prop
;
int
ref_counter
;
Impl
()
:
prop
(
0
)
{}
};
cv
::
viz
::
Widget
::
Widget
()
:
impl_
(
0
)
{
create
();
}
cv
::
viz
::
Widget
::
Widget
(
const
Widget
&
other
)
:
impl_
(
other
.
impl_
)
{
if
(
impl_
)
CV_XADD
(
&
impl_
->
ref_counter
,
1
);
}
cv
::
viz
::
Widget
&
cv
::
viz
::
Widget
::
operator
=
(
const
Widget
&
other
)
{
if
(
this
!=
&
other
)
{
release
();
impl_
=
other
.
impl_
;
if
(
impl_
)
CV_XADD
(
&
impl_
->
ref_counter
,
1
);
}
return
*
this
;
}
cv
::
viz
::
Widget
::~
Widget
()
{
release
();
}
void
cv
::
viz
::
Widget
::
create
()
{
if
(
impl_
)
release
();
impl_
=
new
Impl
();
impl_
->
ref_counter
=
1
;
}
void
cv
::
viz
::
Widget
::
release
()
{
if
(
impl_
&&
CV_XADD
(
&
impl_
->
ref_counter
,
-
1
)
==
1
)
{
delete
impl_
;
impl_
=
0
;
}
}
cv
::
viz
::
Widget
::
Widget
()
:
impl_
(
new
Impl
()
)
{
}
cv
::
viz
::
Widget
cv
::
viz
::
Widget
::
fromPlyFile
(
const
String
&
file_name
)
{
...
...
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