diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-13 17:35:03 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-13 17:35:03 +0000 |
commit | d62e5084e361ff643efeeaf54e032e5252c49b07 (patch) | |
tree | bb85985655befcf49f4ef0c2ca1ef4fd7cfaca85 /skia/ext/vector_platform_device_emf_win.cc | |
parent | 3225dc561c450ed917af0224ca7e89fe1638d2cc (diff) | |
download | chromium_src-d62e5084e361ff643efeeaf54e032e5252c49b07.zip chromium_src-d62e5084e361ff643efeeaf54e032e5252c49b07.tar.gz chromium_src-d62e5084e361ff643efeeaf54e032e5252c49b07.tar.bz2 |
Added OS specific structs initialization.
Does not fix any bugs but looks suspicious.
BUG=359548
Review URL: https://codereview.chromium.org/232213002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/vector_platform_device_emf_win.cc')
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc index ce00a49..1dd59d3 100644 --- a/skia/ext/vector_platform_device_emf_win.cc +++ b/skia/ext/vector_platform_device_emf_win.cc @@ -73,7 +73,7 @@ SkBaseDevice* VectorPlatformDeviceEmf::create(HDC dc, int width, int height) { HGDIOBJ selected_bitmap = GetCurrentObject(dc, OBJ_BITMAP); bool succeeded = false; if (selected_bitmap != NULL) { - BITMAP bitmap_data; + BITMAP bitmap_data = {0}; if (GetObject(selected_bitmap, sizeof(BITMAP), &bitmap_data) == sizeof(BITMAP)) { // The context has a bitmap attached. Attach our SkBitmap to it. @@ -394,7 +394,7 @@ bool SkGDIFontSetup::useGDI(HDC hdc, const SkPaint& paint) { fSavedTextColor = GetTextColor(hdc); SetTextColor(hdc, skia::SkColorToCOLORREF(paint.getColor())); - LOGFONT lf; + LOGFONT lf = {0}; SkLOGFONTFromTypeface(paint.getTypeface(), &lf); lf.lfHeight = -SkScalarRoundToInt(paint.getTextSize()); fNewFont = CreateFontIndirect(&lf); @@ -441,7 +441,7 @@ SK_API void SetSkiaEnsureTypefaceCharactersAccessible( void EnsureTypefaceCharactersAccessible( const SkTypeface& typeface, const wchar_t* text, unsigned int text_length) { - LOGFONT lf; + LOGFONT lf = {0}; SkLOGFONTFromTypeface(&typeface, &lf); g_skia_ensure_typeface_characters_accessible(lf, text, text_length); } @@ -457,7 +457,7 @@ bool EnsureExtTextOut(HDC hdc, int x, int y, UINT options, const RECT * lprect, characters); success = ExtTextOut(hdc, x, y, options, lprect, text, characters, lpDx); if (!success) { - LOGFONT lf; + LOGFONT lf = {0}; SkLOGFONTFromTypeface(typeface, &lf); VLOG(1) << "SkFontHost::EnsureTypefaceCharactersAccessible FAILED for " << " FaceName = " << lf.lfFaceName @@ -766,7 +766,7 @@ bool VectorPlatformDeviceEmf::CreatePen(bool use_pen, } // Load a custom pen. - LOGBRUSH brush; + LOGBRUSH brush = {0}; brush.lbStyle = BS_SOLID; brush.lbColor = color; brush.lbHatch = 0; @@ -898,8 +898,7 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap, // Create a BMP v4 header that we can serialize. We use the shared "V3" // fillter to fill the stardard items, then add in the "V4" stuff we want. - BITMAPV4HEADER bitmap_header; - memset(&bitmap_header, 0, sizeof(BITMAPV4HEADER)); + BITMAPV4HEADER bitmap_header = {0}; FillBitmapInfoHeader(src_size_x, src_size_y, reinterpret_cast<BITMAPINFOHEADER*>(&bitmap_header)); bitmap_header.bV4Size = sizeof(BITMAPV4HEADER); @@ -931,7 +930,7 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap, } HDC dc = BeginPlatformPaint(); - BITMAPINFOHEADER hdr; + BITMAPINFOHEADER hdr = {0}; FillBitmapInfoHeader(src_size_x, src_size_y, &hdr); if (is_translucent) { // The image must be loaded as a bitmap inside a device context. |