Changeset 92227 in webkit
- Timestamp:
- Aug 2, 2011 2:06:10 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r92224 r92227 1 2011-08-02 Stephen White <senorblanco@chromium.org> 2 3 [Chromium] Remove an unnecessary readback during accelerated 4 canvas-to-canvas draws. 5 https://bugs.webkit.org/show_bug.cgi?id=65560 6 7 Reviewed by James Robinson. 8 9 No new tests. (Printing has few tests, sadly.) 10 11 * platform/graphics/skia/ImageBufferSkia.cpp: 12 (WebCore::ImageBuffer::draw): 13 Revert most of the changes to this file from 14 http://trac.webkit.org/changeset/91870, except for the call which makes 15 the source context current, so that the readPixels() still works. 16 17 1 18 2011-08-02 Filip Pizlo <fpizlo@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
r91870 r92227 113 113 CompositeOperator op, bool useLowQualityScale) 114 114 { 115 m_context->platformContext()->makeGrContextCurrent(); 116 SkDevice* srcDevice = m_context->platformContext()->canvas()->getDevice(); 117 SkBitmap bitmap = srcDevice->accessBitmap(false); 118 SkAutoLockPixels bitmapLock(bitmap); 115 // Set both graphics contexts current. This looks a little weird, but is 116 // necessary since we may be drawing from an accelerated to 117 // non-accelerated context (e.g., printing), or vice versa. Note that it 118 // only works because the context is actually the same underlying context 119 // (or null), since we use one context for accelerated drawing. If that 120 // assumption changes, we'll have to revisit this code. 119 121 context->platformContext()->makeGrContextCurrent(); 120 RefPtr<Image> image = BitmapImageSingleFrameSkia::create(bitmap, context == m_context); 122 m_context->platformContext()->makeGrContextCurrent(); 123 RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), context == m_context); 121 124 context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale); 122 125 }
Note: See TracChangeset
for help on using the changeset viewer.