118 LONG prev_val =
This->lock, new_val;
122 new_val = prev_val - 1;
140 *
ppv = &
This->IWICBitmapLock_iface;
158 TRACE(
"(%p) refcount=%u\n", iface,
ref);
168 TRACE(
"(%p) refcount=%u\n", iface,
ref);
173 IWICBitmap_Release(&
This->parent->IWICBitmap_iface);
184 TRACE(
"(%p,%p,%p)\n", iface, puiWidth, puiHeight);
186 if (!puiWidth || !puiHeight)
189 *puiWidth =
This->width;
190 *puiHeight =
This->height;
199 TRACE(
"(%p,%p)\n", iface, pcbStride);
204 *pcbStride =
This->parent->stride;
210 UINT *pcbBufferSize,
BYTE **ppbData)
213 TRACE(
"(%p,%p,%p)\n", iface, pcbBufferSize, ppbData);
215 if (!pcbBufferSize || !ppbData)
218 *pcbBufferSize =
This->parent->stride * (
This->height - 1) +
219 ((
This->parent->bpp *
This->width) + 7)/8;
220 *ppbData =
This->data;
229 TRACE(
"(%p,%p)\n", iface, pPixelFormat);
231 return IWICBitmap_GetPixelFormat(&
This->parent->IWICBitmap_iface, pPixelFormat);
256 *
ppv = &
This->IWICBitmap_iface;
261 *
ppv = &
This->IMILBitmap_iface;
279 TRACE(
"(%p) refcount=%u\n", iface,
ref);
289 TRACE(
"(%p) refcount=%u\n", iface,
ref);
293 if (
This->palette) IWICPalette_Release(
This->palette);
294 This->cs.DebugInfo->Spare[0] = 0;
310 TRACE(
"(%p,%p,%p)\n", iface, puiWidth, puiHeight);
312 if (!puiWidth || !puiHeight)
315 *puiWidth =
This->width;
316 *puiHeight =
This->height;
325 TRACE(
"(%p,%p)\n", iface, pPixelFormat);
336 double *pDpiX,
double *pDpiY)
339 TRACE(
"(%p,%p,%p)\n", iface, pDpiX, pDpiY);
341 if (!pDpiX || !pDpiY)
356 TRACE(
"(%p,%p)\n", iface, pIPalette);
358 if (!
This->palette_set)
361 return IWICPalette_InitializeFromPalette(pIPalette,
This->palette);
371 This->stride,
prc, cbStride, cbBufferSize, pbBuffer);
393 else if (prcLock->
X >=
This->width || prcLock->
Y >=
This->height ||
398 else if (((prcLock->
X *
This->bpp) % 8) != 0)
400 FIXME(
"Cannot lock at an X coordinate not at a full byte\n");
420 (
This->bpp * prcLock->
X)/8;
422 IWICBitmap_AddRef(&
This->IWICBitmap_iface);
423 *ppILock = &
result->IWICBitmapLock_iface;
433 TRACE(
"(%p,%p)\n", iface, pIPalette);
445 IWICPalette_Release(new_palette);
449 hr = IWICPalette_InitializeFromPalette(
This->palette, pIPalette);
452 This->palette_set = 1;
458 double dpiX,
double dpiY)
461 TRACE(
"(%p,%f,%f)\n", iface, dpiX, dpiY);
490 return IWICBitmap_QueryInterface(&
This->IWICBitmap_iface, iid,
ppv);
496 return IWICBitmap_AddRef(&
This->IWICBitmap_iface);
502 return IWICBitmap_Release(&
This->IWICBitmap_iface);
519 { &GUID_WICPixelFormatDontCare, 0 },
520 { &GUID_WICPixelFormat1bppIndexed, 1 },
521 { &GUID_WICPixelFormat2bppIndexed, 2 },
522 { &GUID_WICPixelFormat4bppIndexed, 3 },
523 { &GUID_WICPixelFormat8bppIndexed, 4 },
524 { &GUID_WICPixelFormatBlackWhite, 5 },
525 { &GUID_WICPixelFormat2bppGray, 6 },
526 { &GUID_WICPixelFormat4bppGray, 7 },
527 { &GUID_WICPixelFormat8bppGray, 8 },
528 { &GUID_WICPixelFormat16bppBGR555, 9 },
529 { &GUID_WICPixelFormat16bppBGR565, 0x0a },
530 { &GUID_WICPixelFormat16bppGray, 0x0b },
531 { &GUID_WICPixelFormat24bppBGR, 0x0c },
532 { &GUID_WICPixelFormat24bppRGB, 0x0d },
533 { &GUID_WICPixelFormat32bppBGR, 0x0e },
534 { &GUID_WICPixelFormat32bppBGRA, 0x0f },
535 { &GUID_WICPixelFormat32bppPBGRA, 0x10 },
536 { &GUID_WICPixelFormat48bppRGB, 0x15 },
537 { &GUID_WICPixelFormat64bppRGBA, 0x16 },
538 { &GUID_WICPixelFormat64bppPRGBA, 0x17 },
539 { &GUID_WICPixelFormat32bppCMYK, 0x1c }
568 double *dpix,
double *dpiy)
571 TRACE(
"(%p,%p,%p)\n", iface, dpix, dpiy);
572 return IWICBitmap_GetResolution(&
This->IWICBitmap_iface, dpix, dpiy);
580 return IWICBitmap_CopyPalette(&
This->IWICBitmap_iface,
palette);
600 *
ppv = &
This->IMILUnknown1_iface;
609 return IWICBitmap_Lock(&
This->IWICBitmap_iface, rc,
flags,
lock);
615 IWICBitmapLock_Release(
lock);
623 return IWICBitmap_SetPalette(&
This->IWICBitmap_iface,
palette);
629 TRACE(
"(%p,%f,%f)\n", iface, dpix, dpiy);
630 return IWICBitmap_SetResolution(&
This->IWICBitmap_iface, dpix, dpiy);
635 FIXME(
"(%p,%p): stub\n", iface, rc);
669 return IWICBitmap_AddRef(&
This->IWICBitmap_iface);
675 return IWICBitmap_Release(&
This->IWICBitmap_iface);
680 FIXME(
"(%p,%p): stub\n", iface,
arg);
691 FIXME(
"(%p,%p): stub\n", iface,
arg);
697 FIXME(
"(%p,%p): stub\n", iface,
arg);
703 FIXME(
"(%p,%p): stub\n", iface,
arg);
715 FIXME(
"(%p,%p): stub\n", iface,
arg);
721 FIXME(
"(%p): stub\n", iface);
754 FIXME(
"(%p): stub\n", iface);
760 FIXME(
"(%p): stub\n", iface);
827 This->palette_set = 0;
832 This->width = uiWidth;
833 This->height = uiHeight;
839 This->cs.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": BitmapImpl.lock");
841 *ppIBitmap = &
This->IWICBitmap_iface;
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size, const struct pixel_format_desc *format) DECLSPEC_HIDDEN
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
static HRESULT WINAPI BitmapLockImpl_QueryInterface(IWICBitmapLock *iface, REFIID iid, void **ppv)
static void BitmapImpl_ReleaseLock(BitmapImpl *This)
static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid, void **ppv)
static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmap *iface, REFIID iid, void **ppv)
static HRESULT WINAPI BitmapLockImpl_GetDataPointer(IWICBitmapLock *iface, UINT *pcbBufferSize, BYTE **ppbData)
static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface)
static HRESULT WINAPI IMILBitmapImpl_unknown1(IMILBitmap *iface, void **ppv)
static BitmapImpl * impl_from_IMILBitmap(IMILBitmap *iface)
static const IMILBitmapVtbl IMILBitmapImpl_Vtbl
static HRESULT WINAPI BitmapImpl_CopyPalette(IWICBitmap *iface, IWICPalette *pIPalette)
static HRESULT WINAPI IMILUnknown2Impl_unknown1(IMILUnknown2 *iface, void *arg1, void **arg2)
static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmap *iface, IWICPalette *palette)
static BOOL BitmapImpl_AcquireLock(BitmapImpl *This, int write)
static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmap *iface, const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
static ULONG WINAPI BitmapLockImpl_Release(IWICBitmapLock *iface)
static HRESULT WINAPI BitmapLockImpl_GetStride(IWICBitmapLock *iface, UINT *pcbStride)
static BitmapImpl * impl_from_IMILUnknown1(IMILUnknown1 *iface)
static HRESULT WINAPI IMILBitmapImpl_SetPalette(IMILBitmap *iface, IWICPalette *palette)
static HRESULT WINAPI IMILUnknown1Impl_unknown6(IMILUnknown1 *iface, DWORD64 arg)
static HRESULT WINAPI IMILBitmapImpl_AddDirtyRect(IMILBitmap *iface, const WICRect *rc)
static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmap *iface, int *format)
DECLSPEC_HIDDEN void WINAPI IMILUnknown1Impl_unknown1(IMILUnknown1 *iface, void *arg)
static HRESULT WINAPI IMILUnknown1Impl_unknown7(IMILUnknown1 *iface, void *arg)
static ULONG WINAPI BitmapImpl_AddRef(IWICBitmap *iface)
static BitmapLockImpl * impl_from_IWICBitmapLock(IWICBitmapLock *iface)
static HRESULT WINAPI BitmapLockImpl_GetSize(IWICBitmapLock *iface, UINT *puiWidth, UINT *puiHeight)
static HRESULT WINAPI BitmapImpl_GetPixelFormat(IWICBitmap *iface, WICPixelFormatGUID *pPixelFormat)
static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface)
static HRESULT WINAPI BitmapImpl_QueryInterface(IWICBitmap *iface, REFIID iid, void **ppv)
static HRESULT WINAPI IMILUnknown1Impl_unknown2(IMILUnknown1 *iface, void *arg1, void *arg2)
HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight, UINT stride, UINT datasize, void *view, UINT offset, REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option, IWICBitmap **ppIBitmap)
static HRESULT WINAPI BitmapLockImpl_GetPixelFormat(IWICBitmapLock *iface, WICPixelFormatGUID *pPixelFormat)
static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface)
static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid, void **ppv)
static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmap *iface, double *dpix, double *dpiy)
static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface)
static BitmapImpl * impl_from_IMILUnknown2(IMILUnknown2 *iface)
static HRESULT WINAPI BitmapImpl_Lock(IWICBitmap *iface, const WICRect *prcLock, DWORD flags, IWICBitmapLock **ppILock)
static BitmapImpl * impl_from_IWICBitmap(IWICBitmap *iface)
static HRESULT WINAPI IMILUnknown2Impl_unknown2(IMILUnknown2 *iface, void *arg1, void *arg2)
static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmap *iface, UINT *width, UINT *height)
static HRESULT WINAPI IMILUnknown1Impl_unknown5(IMILUnknown1 *iface, void *arg)
static HRESULT WINAPI BitmapImpl_GetResolution(IWICBitmap *iface, double *pDpiX, double *pDpiY)
DECLSPEC_HIDDEN HRESULT WINAPI IMILUnknown1Impl_unknown8(IMILUnknown1 *iface)
static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl
DECLSPEC_HIDDEN HRESULT WINAPI IMILUnknown1Impl_unknown3(IMILUnknown1 *iface, void *arg)
static HRESULT WINAPI IMILUnknown2Impl_unknown3(IMILUnknown2 *iface, void *arg1)
static HRESULT WINAPI BitmapImpl_SetResolution(IWICBitmap *iface, double dpiX, double dpiY)
static const IWICBitmapLockVtbl BitmapLockImpl_Vtbl
static HRESULT WINAPI IMILBitmapImpl_Lock(IMILBitmap *iface, const WICRect *rc, DWORD flags, IWICBitmapLock **lock)
static HRESULT WINAPI BitmapImpl_CopyPixels(IWICBitmap *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
static ULONG WINAPI IMILBitmapImpl_AddRef(IMILBitmap *iface)
static HRESULT WINAPI IMILBitmapImpl_Unlock(IMILBitmap *iface, IWICBitmapLock *lock)
static ULONG WINAPI BitmapLockImpl_AddRef(IWICBitmapLock *iface)
static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmap *iface)
static HRESULT WINAPI IMILBitmapImpl_SetResolution(IMILBitmap *iface, double dpix, double dpiy)
static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl
static const IWICBitmapVtbl BitmapImpl_Vtbl
static const struct @593 pixel_fmt_map[]
static ULONG WINAPI BitmapImpl_Release(IWICBitmap *iface)
static HRESULT WINAPI BitmapImpl_GetSize(IWICBitmap *iface, UINT *puiWidth, UINT *puiHeight)
static HRESULT WINAPI BitmapImpl_SetPalette(IWICBitmap *iface, IWICPalette *pIPalette)
static HRESULT WINAPI IMILUnknown1Impl_unknown4(IMILUnknown1 *iface, void *arg)
HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp)
HRESULT PaletteImpl_Create(IWICPalette **palette)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define InterlockedCompareExchangePointer
#define InterlockedCompareExchange
#define memcpy(s1, s2, n)
#define DEFINE_THISCALL_WRAPPER(func, args)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
IMILUnknown1 IMILUnknown1_iface
IMILUnknown2 IMILUnknown2_iface
IWICBitmap IWICBitmap_iface
IMILBitmap IMILBitmap_iface
WICPixelFormatGUID pixelformat
IWICBitmapLock IWICBitmapLock_iface
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
WICBitmapCreateCacheOption
static const char * debug_wic_rect(const WICRect *rect)
#define WINCODEC_ERR_ALREADYLOCKED
#define WINCODEC_ERR_PALETTEUNAVAILABLE
#define WINCODEC_ERR_INSUFFICIENTBUFFER