Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/WebCore/rendering/FilterEffectRenderer.cpp

Issue 9429011: Merge 107822 - Source/WebCore: Fix for incorrect/offset image in CSS filters (non-composited path) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/platform/mac-snowleopard/css3/filters/multiple-filters-invalidation-expected.png ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void FilterEffectRenderer::prepare() 319 void FilterEffectRenderer::prepare()
320 { 320 {
321 // At this point the effect chain has been built, and the 321 // At this point the effect chain has been built, and the
322 // source image sizes set. We just need to attach the graphic 322 // source image sizes set. We just need to attach the graphic
323 // buffer if we have not yet done so. 323 // buffer if we have not yet done so.
324 if (!m_graphicsBufferAttached) { 324 if (!m_graphicsBufferAttached) {
325 setSourceImage(ImageBuffer::create(IntSize(m_sourceDrawingRegion.width() , m_sourceDrawingRegion.height()), ColorSpaceDeviceRGB, renderingMode())); 325 setSourceImage(ImageBuffer::create(IntSize(m_sourceDrawingRegion.width() , m_sourceDrawingRegion.height()), ColorSpaceDeviceRGB, renderingMode()));
326 m_graphicsBufferAttached = true; 326 m_graphicsBufferAttached = true;
327 } 327 }
328 m_sourceGraphic->clearResult(); 328 m_sourceGraphic->clearResult();
329 lastEffect()->clearResult(); 329 for (size_t i = 0; i < m_effects.size(); ++i)
330 m_effects[i]->clearResult();
330 } 331 }
331 332
332 void FilterEffectRenderer::apply() 333 void FilterEffectRenderer::apply()
333 { 334 {
334 lastEffect()->apply(); 335 lastEffect()->apply();
335 } 336 }
336 337
337 338
338 GraphicsContext* FilterEffectRendererHelper::beginFilterEffect(RenderLayer* rend erLayer, GraphicsContext* oldContext, const LayoutRect& filterRect) 339 GraphicsContext* FilterEffectRendererHelper::beginFilterEffect(RenderLayer* rend erLayer, GraphicsContext* oldContext, const LayoutRect& filterRect)
339 { 340 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 destRect.move(m_paintOffset.x(), m_paintOffset.y()); 378 destRect.move(m_paintOffset.x(), m_paintOffset.y());
378 379
379 m_savedGraphicsContext->drawImageBuffer(filter->output(), m_renderLayer->ren derer()->style()->colorSpace(), destRect, CompositeSourceOver); 380 m_savedGraphicsContext->drawImageBuffer(filter->output(), m_renderLayer->ren derer()->style()->colorSpace(), destRect, CompositeSourceOver);
380 381
381 return m_savedGraphicsContext; 382 return m_savedGraphicsContext;
382 } 383 }
383 384
384 } // namespace WebCore 385 } // namespace WebCore
385 386
386 #endif // ENABLE(CSS_FILTERS) 387 #endif // ENABLE(CSS_FILTERS)
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac-snowleopard/css3/filters/multiple-filters-invalidation-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698