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
d11c0f38
Commit
d11c0f38
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Use an iface instead of a vtbl pointer in FlipRotator.
parent
7e106986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
fliprotate.c
dlls/windowscodecs/fliprotate.c
+14
-9
No files found.
dlls/windowscodecs/fliprotate.c
View file @
d11c0f38
...
...
@@ -34,7 +34,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wincodecs
);
typedef
struct
FlipRotator
{
const
IWICBitmapFlipRotatorVtbl
*
lpVtbl
;
IWICBitmapFlipRotator
IWICBitmapFlipRotator_iface
;
LONG
ref
;
IWICBitmapSource
*
source
;
int
flip_x
;
...
...
@@ -43,10 +43,15 @@ typedef struct FlipRotator {
CRITICAL_SECTION
lock
;
/* must be held when initialized */
}
FlipRotator
;
static
inline
FlipRotator
*
impl_from_IWICBitmapFlipRotator
(
IWICBitmapFlipRotator
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
FlipRotator
,
IWICBitmapFlipRotator_iface
);
}
static
HRESULT
WINAPI
FlipRotator_QueryInterface
(
IWICBitmapFlipRotator
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -69,7 +74,7 @@ static HRESULT WINAPI FlipRotator_QueryInterface(IWICBitmapFlipRotator *iface, R
static
ULONG
WINAPI
FlipRotator_AddRef
(
IWICBitmapFlipRotator
*
iface
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -79,7 +84,7 @@ static ULONG WINAPI FlipRotator_AddRef(IWICBitmapFlipRotator *iface)
static
ULONG
WINAPI
FlipRotator_Release
(
IWICBitmapFlipRotator
*
iface
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -98,7 +103,7 @@ static ULONG WINAPI FlipRotator_Release(IWICBitmapFlipRotator *iface)
static
HRESULT
WINAPI
FlipRotator_GetSize
(
IWICBitmapFlipRotator
*
iface
,
UINT
*
puiWidth
,
UINT
*
puiHeight
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
TRACE
(
"(%p,%p,%p)
\n
"
,
iface
,
puiWidth
,
puiHeight
);
if
(
!
This
->
source
)
...
...
@@ -135,7 +140,7 @@ static HRESULT WINAPI FlipRotator_CopyPalette(IWICBitmapFlipRotator *iface,
static
HRESULT
WINAPI
FlipRotator_CopyPixels
(
IWICBitmapFlipRotator
*
iface
,
const
WICRect
*
prc
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
HRESULT
hr
;
UINT
y
;
UINT
srcy
,
srcwidth
,
srcheight
;
...
...
@@ -194,7 +199,7 @@ static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface,
static
HRESULT
WINAPI
FlipRotator_Initialize
(
IWICBitmapFlipRotator
*
iface
,
IWICBitmapSource
*
pISource
,
WICBitmapTransformOptions
options
)
{
FlipRotator
*
This
=
(
FlipRotator
*
)
iface
;
FlipRotator
*
This
=
impl_from_IWICBitmapFlipRotator
(
iface
)
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p,%p,%u)
\n
"
,
iface
,
pISource
,
options
);
...
...
@@ -253,7 +258,7 @@ HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator)
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FlipRotator
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
FlipRotator_Vtbl
;
This
->
IWICBitmapFlipRotator_iface
.
lpVtbl
=
&
FlipRotator_Vtbl
;
This
->
ref
=
1
;
This
->
source
=
NULL
;
This
->
flip_x
=
0
;
...
...
@@ -262,7 +267,7 @@ HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator)
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": FlipRotator.lock"
);
*
fliprotator
=
(
IWICBitmapFlipRotator
*
)
This
;
*
fliprotator
=
&
This
->
IWICBitmapFlipRotator_iface
;
return
S_OK
;
}
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