salbmp.cxx (5f27b83c) | salbmp.cxx (fa064a0d) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 147 unchanged lines hidden (view full) --- 156 Stop(); 157 } 158 159 // delete at WinSalBitmap after entry is removed; this 160 // way it would not hurt to call remEntry from there, too 161 if(pSource->maGdiPlusBitmap.get()) 162 { 163 pSource->maGdiPlusBitmap.reset(); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 147 unchanged lines hidden (view full) --- 156 Stop(); 157 } 158 159 // delete at WinSalBitmap after entry is removed; this 160 // way it would not hurt to call remEntry from there, too 161 if(pSource->maGdiPlusBitmap.get()) 162 { 163 pSource->maGdiPlusBitmap.reset(); |
164 pSource->mpAssociatedAlpha = 0; |
|
164 } 165 } 166 } 167 168 if(!maEntries.empty()) 169 { 170 Start(); 171 } --- 9 unchanged lines hidden (view full) --- 181// ------------------------------------------------------------------ 182// - WinSalBitmap - 183 184WinSalBitmap::WinSalBitmap() 185: maSize(), 186 mhDIB(0), 187 mhDDB(0), 188 maGdiPlusBitmap(), | 165 } 166 } 167 } 168 169 if(!maEntries.empty()) 170 { 171 Start(); 172 } --- 9 unchanged lines hidden (view full) --- 182// ------------------------------------------------------------------ 183// - WinSalBitmap - 184 185WinSalBitmap::WinSalBitmap() 186: maSize(), 187 mhDIB(0), 188 mhDDB(0), 189 maGdiPlusBitmap(), |
190 mpAssociatedAlpha(0), |
|
189 mnBitCount(0) 190{ 191} 192 193// ------------------------------------------------------------------ 194 195WinSalBitmap::~WinSalBitmap() 196{ --- 17 unchanged lines hidden (view full) --- 214 maSize = Size(); 215 mnBitCount = 0; 216} 217 218// ------------------------------------------------------------------ 219 220GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSource) const 221{ | 191 mnBitCount(0) 192{ 193} 194 195// ------------------------------------------------------------------ 196 197WinSalBitmap::~WinSalBitmap() 198{ --- 17 unchanged lines hidden (view full) --- 216 maSize = Size(); 217 mnBitCount = 0; 218} 219 220// ------------------------------------------------------------------ 221 222GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSource) const 223{ |
224 WinSalBitmap* pThat = const_cast< WinSalBitmap* >(this); 225 226 if(maGdiPlusBitmap.get() && pAlphaSource != mpAssociatedAlpha) 227 { 228 // #122350# if associated alpha with which the GDIPlus was constructed has changed 229 // it is necessary to remove it from buffer, reset reference to it and reconstruct 230 pThat->maGdiPlusBitmap.reset(); 231 aGdiPlusBuffer.remEntry(const_cast< WinSalBitmap& >(*this)); 232 } 233 |
|
222 if(maGdiPlusBitmap.get()) 223 { 224 aGdiPlusBuffer.touchEntry(const_cast< WinSalBitmap& >(*this)); 225 } 226 else 227 { 228 if(maSize.Width() > 0 && maSize.Height() > 0) 229 { | 234 if(maGdiPlusBitmap.get()) 235 { 236 aGdiPlusBuffer.touchEntry(const_cast< WinSalBitmap& >(*this)); 237 } 238 else 239 { 240 if(maSize.Width() > 0 && maSize.Height() > 0) 241 { |
230 WinSalBitmap* pThat = const_cast< WinSalBitmap* >(this); 231 | |
232 if(pAlphaSource) 233 { 234 pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap(*pAlphaSource)); | 242 if(pAlphaSource) 243 { 244 pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap(*pAlphaSource)); |
245 pThat->mpAssociatedAlpha = pAlphaSource; |
|
235 } 236 else 237 { 238 pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap()); | 246 } 247 else 248 { 249 pThat->maGdiPlusBitmap.reset(pThat->ImplCreateGdiPlusBitmap()); |
250 pThat->mpAssociatedAlpha = 0; |
|
239 } 240 241 if(maGdiPlusBitmap.get()) 242 { 243 aGdiPlusBuffer.addEntry(*pThat); 244 } 245 } 246 } --- 800 unchanged lines hidden --- | 251 } 252 253 if(maGdiPlusBitmap.get()) 254 { 255 aGdiPlusBuffer.addEntry(*pThat); 256 } 257 } 258 } --- 800 unchanged lines hidden --- |