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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.cpp

Issue 10574034: Merge 120640 - [chromium] REGRESSION(r120346) ContentLayerPainter should clear rect to be painted (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 26
27 #include "config.h" 27 #include "config.h"
28 28
29 #if USE(ACCELERATED_COMPOSITING) 29 #if USE(ACCELERATED_COMPOSITING)
30 30
31 #include "CanvasLayerTextureUpdater.h" 31 #include "CanvasLayerTextureUpdater.h"
32 32
33 #include "GraphicsContext.h" 33 #include "GraphicsContext.h"
34 #include "LayerPainterChromium.h" 34 #include "LayerPainterChromium.h"
35 #include "PlatformContextSkia.h" 35 #include "PlatformContextSkia.h"
36 #include "SkCanvas.h"
37 #include "SkPaint.h"
38 #include "SkRect.h"
36 #include "SkiaUtils.h" 39 #include "SkiaUtils.h"
37 #include "TraceEvent.h" 40 #include "TraceEvent.h"
38 41
39 namespace WebCore { 42 namespace WebCore {
40 43
41 CanvasLayerTextureUpdater::CanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChro mium> painter) 44 CanvasLayerTextureUpdater::CanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChro mium> painter)
42 : m_painter(painter) 45 : m_painter(painter)
43 { 46 {
44 } 47 }
45 48
(...skipping 10 matching lines...) Expand all
56 IntRect scaledContentRect = contentRect; 59 IntRect scaledContentRect = contentRect;
57 60
58 if (contentsScale != 1.0) { 61 if (contentsScale != 1.0) {
59 canvas->scale(WebCoreFloatToSkScalar(contentsScale), WebCoreFloatToSkSca lar(contentsScale)); 62 canvas->scale(WebCoreFloatToSkScalar(contentsScale), WebCoreFloatToSkSca lar(contentsScale));
60 63
61 FloatRect rect = contentRect; 64 FloatRect rect = contentRect;
62 rect.scale(1 / contentsScale); 65 rect.scale(1 / contentsScale);
63 scaledContentRect = enclosingIntRect(rect); 66 scaledContentRect = enclosingIntRect(rect);
64 } 67 }
65 68
69 SkPaint paint;
70 paint.setAntiAlias(false);
71 paint.setXfermodeMode(SkXfermode::kClear_Mode);
72 canvas->drawRect(scaledContentRect, paint);
73 canvas->clipRect(scaledContentRect);
74
66 m_painter->paint(canvas, scaledContentRect, resultingOpaqueRect); 75 m_painter->paint(canvas, scaledContentRect, resultingOpaqueRect);
67 canvas->restore(); 76 canvas->restore();
68 77
69 m_contentRect = contentRect; 78 m_contentRect = contentRect;
70 } 79 }
71 80
72 } // namespace WebCore 81 } // namespace WebCore
73 #endif // USE(ACCELERATED_COMPOSITING) 82 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698