| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // Fall through to filling with white. | 270 // Fall through to filling with white. |
| 271 setupLayerForWhiteLayer(); | 271 setupLayerForWhiteLayer(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void TransparencyWin::setupLayerForWhiteLayer() | 274 void TransparencyWin::setupLayerForWhiteLayer() |
| 275 { | 275 { |
| 276 initializeNewContext(); | 276 initializeNewContext(); |
| 277 if (!m_validLayer) | 277 if (!m_validLayer) |
| 278 return; | 278 return; |
| 279 | 279 |
| 280 m_drawContext->fillRect(IntRect(IntPoint(0, 0), m_layerSize), Color::white,
ColorSpaceDeviceRGB); | 280 m_drawContext->fillRect(IntRect(IntPoint(0, 0), m_layerSize), Color::white); |
| 281 // Layer rect represents the part of the original layer. | 281 // Layer rect represents the part of the original layer. |
| 282 } | 282 } |
| 283 | 283 |
| 284 void TransparencyWin::setupTransform(const IntRect& region) | 284 void TransparencyWin::setupTransform(const IntRect& region) |
| 285 { | 285 { |
| 286 switch (m_transformMode) { | 286 switch (m_transformMode) { |
| 287 case KeepTransform: | 287 case KeepTransform: |
| 288 setupTransformForKeepTransform(region); | 288 setupTransformForKeepTransform(region); |
| 289 break; | 289 break; |
| 290 case Untransform: | 290 case Untransform: |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 507 |
| 508 SkBitmap& bitmap = const_cast<SkBitmap&>(m_drawContext->layerBitmap(Graphics
Context::ReadWrite)); | 508 SkBitmap& bitmap = const_cast<SkBitmap&>(m_drawContext->layerBitmap(Graphics
Context::ReadWrite)); |
| 509 for (int y = 0; y < m_layerSize.height(); y++) { | 509 for (int y = 0; y < m_layerSize.height(); y++) { |
| 510 uint32_t* row = bitmap.getAddr32(0, y); | 510 uint32_t* row = bitmap.getAddr32(0, y); |
| 511 for (int x = 0; x < m_layerSize.width(); x++) | 511 for (int x = 0; x < m_layerSize.width(); x++) |
| 512 row[x] |= 0xFF000000; | 512 row[x] |= 0xFF000000; |
| 513 } | 513 } |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace WebCore | 516 } // namespace WebCore |
| OLD | NEW |