| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 GrTexture* drawBufTex = static_cast<GrTexture*>(gr->createPlatformSu
rface(drawBufDesc)); | 743 GrTexture* drawBufTex = static_cast<GrTexture*>(gr->createPlatformSu
rface(drawBufDesc)); |
| 744 // FIXME: This should use a smart pointer. | 744 // FIXME: This should use a smart pointer. |
| 745 SkDeviceFactory* factory = new SkGpuDeviceFactory(gr, drawBufTex); | 745 SkDeviceFactory* factory = new SkGpuDeviceFactory(gr, drawBufTex); |
| 746 // FIXME: This should use a smart pointer. | 746 // FIXME: This should use a smart pointer. |
| 747 drawBufTex->unref(); | 747 drawBufTex->unref(); |
| 748 | 748 |
| 749 // FIXME: This should use a smart pointer. | 749 // FIXME: This should use a smart pointer. |
| 750 SkDevice* device = factory->newDevice(m_canvas, SkBitmap::kARGB_8888
_Config, drawingBuffer->size().width(), drawingBuffer->size().height(), false, f
alse); | 750 SkDevice* device = factory->newDevice(m_canvas, SkBitmap::kARGB_8888
_Config, drawingBuffer->size().width(), drawingBuffer->size().height(), false, f
alse); |
| 751 // FIXME: This should use a smart pointer. | 751 // FIXME: This should use a smart pointer. |
| 752 m_canvas->setDevice(device)->unref(); | 752 m_canvas->setDevice(device)->unref(); |
| 753 m_canvas->setDeviceFactory(factory); | 753 m_canvas->setDeviceFactory(factory)->unref(); |
| 754 } else | 754 } else |
| 755 m_accelerationMode = GPU; | 755 m_accelerationMode = GPU; |
| 756 } else { | 756 } else { |
| 757 syncSoftwareCanvas(); | 757 syncSoftwareCanvas(); |
| 758 m_uploadTexture.clear(); | 758 m_uploadTexture.clear(); |
| 759 m_gpuCanvas.clear(); | 759 m_gpuCanvas.clear(); |
| 760 } | 760 } |
| 761 #endif | 761 #endif |
| 762 } | 762 } |
| 763 | 763 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 // Swizzles from RGBA -> BGRA. | 902 // Swizzles from RGBA -> BGRA. |
| 903 pixels[i] = (pixel & 0xFF00FF00) | ((pixel & 0x00FF0000) >> 16)
| ((pixel & 0x000000FF) << 16); | 903 pixels[i] = (pixel & 0xFF00FF00) | ((pixel & 0x00FF0000) >> 16)
| ((pixel & 0x000000FF) << 16); |
| 904 } | 904 } |
| 905 } | 905 } |
| 906 } | 906 } |
| 907 m_softwareDirtyRect.unite(IntRect(0, 0, width, height)); // Mark everything
as dirty. | 907 m_softwareDirtyRect.unite(IntRect(0, 0, width, height)); // Mark everything
as dirty. |
| 908 #endif | 908 #endif |
| 909 } | 909 } |
| 910 | 910 |
| 911 } // namespace WebCore | 911 } // namespace WebCore |
| OLD | NEW |