Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dbdf1ef8
Commit
dbdf1ef8
authored
Apr 27, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICBitmapFlipRotator_Initialize.
parent
7a254fc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
2 deletions
+46
-2
fliprotate.c
dlls/windowscodecs/fliprotate.c
+46
-2
No files found.
dlls/windowscodecs/fliprotate.c
View file @
dbdf1ef8
...
@@ -36,6 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
...
@@ -36,6 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef
struct
FlipRotator
{
typedef
struct
FlipRotator
{
const
IWICBitmapFlipRotatorVtbl
*
lpVtbl
;
const
IWICBitmapFlipRotatorVtbl
*
lpVtbl
;
LONG
ref
;
LONG
ref
;
IWICBitmapSource
*
source
;
int
flip_x
;
int
flip_y
;
int
swap_xy
;
CRITICAL_SECTION
lock
;
/* must be held when initialized */
CRITICAL_SECTION
lock
;
/* must be held when initialized */
}
FlipRotator
;
}
FlipRotator
;
...
@@ -84,6 +88,7 @@ static ULONG WINAPI FlipRotator_Release(IWICBitmapFlipRotator *iface)
...
@@ -84,6 +88,7 @@ static ULONG WINAPI FlipRotator_Release(IWICBitmapFlipRotator *iface)
{
{
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
DeleteCriticalSection
(
&
This
->
lock
);
if
(
This
->
source
)
IWICBitmapSource_Release
(
This
->
source
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
@@ -132,9 +137,44 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface,
...
@@ -132,9 +137,44 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface,
static
HRESULT
WINAPI
FlipRotator_Initialize
(
IWICBitmapFlipRotator
*
iface
,
static
HRESULT
WINAPI
FlipRotator_Initialize
(
IWICBitmapFlipRotator
*
iface
,
IWICBitmapSource
*
pISource
,
WICBitmapTransformOptions
options
)
IWICBitmapSource
*
pISource
,
WICBitmapTransformOptions
options
)
{
{
FIXME
(
"(%p,%p,%u): stub
\n
"
,
iface
,
pISource
,
options
);
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"(%p,%p,%u)
\n
"
,
iface
,
pISource
,
options
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
This
->
source
)
{
hr
=
WINCODEC_ERR_WRONGSTATE
;
goto
end
;
}
if
(
options
&
WICBitmapTransformRotate90
)
{
This
->
swap_xy
=
1
;
This
->
flip_x
=
!
This
->
flip_x
;
}
if
(
options
&
WICBitmapTransformRotate180
)
{
This
->
flip_x
=
!
This
->
flip_x
;
This
->
flip_y
=
!
This
->
flip_y
;
}
if
(
options
&
WICBitmapTransformFlipHorizontal
)
This
->
flip_x
=
!
This
->
flip_x
;
if
(
options
&
WICBitmapTransformFlipVertical
)
This
->
flip_y
=
!
This
->
flip_y
;
IWICBitmapSource_AddRef
(
pISource
);
This
->
source
=
pISource
;
end:
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
}
static
const
IWICBitmapFlipRotatorVtbl
FlipRotator_Vtbl
=
{
static
const
IWICBitmapFlipRotatorVtbl
FlipRotator_Vtbl
=
{
...
@@ -158,6 +198,10 @@ HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator)
...
@@ -158,6 +198,10 @@ HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator)
This
->
lpVtbl
=
&
FlipRotator_Vtbl
;
This
->
lpVtbl
=
&
FlipRotator_Vtbl
;
This
->
ref
=
1
;
This
->
ref
=
1
;
This
->
source
=
NULL
;
This
->
flip_x
=
0
;
This
->
flip_y
=
0
;
This
->
swap_xy
=
0
;
InitializeCriticalSection
(
&
This
->
lock
);
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": FlipRotator.lock"
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": FlipRotator.lock"
);
...
...
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