Author: tkreuzer
Date: Sat May 22 16:54:48 2010
New Revision: 47304
URL:
http://svn.reactos.org/svn/reactos?rev=47304&view=rev
Log:
[WIN32K]
- Simplify EBRUSHOBJ_vInit and EBRUSHOBJ_bRealizeBrush a bit more
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/eng/engbrush.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/eng/engbrush.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/eng/engbrush.c [iso-8859-1] Sat May
22 16:54:48 2010
@@ -34,17 +34,10 @@
pebo->psurfTrg = pdc->dclevel.pSurface;
ASSERT(pebo->psurfTrg);
-
- if (pebo->psurfTrg->ppal)
- {
- pebo->ppalSurf = pebo->psurfTrg->ppal;
- GDIOBJ_IncrementShareCount(&pebo->ppalSurf->BaseObject);
- }
- else
- pebo->ppalSurf =
PALETTE_ShareLockPalette(pdc->ppdev->devinfo.hpalDefault);
-
- if (!pebo->ppalSurf)
- pebo->ppalSurf = &gpalRGB;
+ ASSERT(pebo->psurfTrg->ppal);
+
+ pebo->ppalSurf = pebo->psurfTrg->ppal;
+ GDIOBJ_IncrementShareCount(&pebo->ppalSurf->BaseObject);
if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
{
@@ -116,8 +109,7 @@
pebo->BrushObject.pvRbrush = NULL;
}
- if (pebo->ppalSurf != &gpalRGB)
- PALETTE_ShareUnlockPalette(pebo->ppalSurf);
+ PALETTE_ShareUnlockPalette(pebo->ppalSurf);
}
VOID
@@ -199,12 +191,8 @@
PPDEVOBJ ppdev = NULL;
EXLATEOBJ exlo;
- // FIXME: all EBRUSHOBJs need a surface, see EBRUSHOBJ_vInit
- if (!pebo->psurfTrg)
- {
- DPRINT1("Pattern brush has no target surface!\n");
- return FALSE;
- }
+ /* All EBRUSHOBJs have a surface, see EBRUSHOBJ_vInit */
+ ASSERT(pebo->psurfTrg);
ppdev = (PPDEVOBJ)pebo->psurfTrg->SurfObj.hdev;