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

Side by Side Diff: Source/platform/graphics/paint/CompositingDisplayItem.cpp

Issue 947893002: Implement SVG masking with slimming paint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a mask debug print string Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/CompositingDisplayItem.h" 6 #include "platform/graphics/paint/CompositingDisplayItem.h"
7 7
8 #include "platform/RuntimeEnabledFeatures.h" 8 #include "platform/RuntimeEnabledFeatures.h"
9 #include "platform/graphics/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/skia/SkiaUtils.h" 10 #include "platform/graphics/skia/SkiaUtils.h"
11 #include "public/platform/WebDisplayItemList.h" 11 #include "public/platform/WebDisplayItemList.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 void BeginCompositingDisplayItem::replay(GraphicsContext* context) 15 void BeginCompositingDisplayItem::replay(GraphicsContext* context)
16 { 16 {
17 context->beginLayer(m_opacity, WebCoreCompositeToSkiaComposite(m_compositeOp , m_blendMode)); 17 context->beginLayer(m_opacity, m_xferMode, m_clipRect.get(), m_colorFilter);
18 } 18 }
19 19
20 void BeginCompositingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) const 20 void BeginCompositingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) const
21 { 21 {
22 // FIXME: Change this to appendCompositingItem. 22 // FIXME: Pass across the rect too.
23 list->appendTransparencyItem(m_opacity, m_blendMode); 23 list->appendCompositingItem(m_opacity, m_xferMode, GraphicsContext::WebCoreC olorFilterToSkiaColorFilter(m_colorFilter).get());
24 } 24 }
25 25
26 #ifndef NDEBUG 26 #ifndef NDEBUG
27 void BeginCompositingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder & stringBuilder) const 27 void BeginCompositingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder & stringBuilder) const
28 { 28 {
29 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); 29 DisplayItem::dumpPropertiesAsDebugString(stringBuilder);
30 stringBuilder.append(WTF::String::format(", compositingOp: %d, blendMode: %d , opacity: %f", m_compositeOp, m_blendMode, m_opacity)); 30 stringBuilder.append(WTF::String::format(", xferMode: %d, opacity: %f", m_xf erMode, m_opacity));
31 } 31 }
32 #endif 32 #endif
33 33
34 void EndCompositingDisplayItem::replay(GraphicsContext* context) 34 void EndCompositingDisplayItem::replay(GraphicsContext* context)
35 { 35 {
36 context->endLayer(); 36 context->endLayer();
37 } 37 }
38 38
39 void EndCompositingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* l ist) const 39 void EndCompositingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* l ist) const
40 { 40 {
41 // FIXME: Change this to appendEndCompositingItem. 41 list->appendEndCompositingItem();
42 list->appendEndTransparencyItem();
43 } 42 }
44 43
45 } // namespace blink 44 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/CompositingDisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698