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

Unified Diff: cc/blink/web_display_item_list_impl.cc

Issue 942403002: Add a compositing display item which replaces transparency display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forward decls and imports oh my 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/blink/web_display_item_list_impl.h ('k') | cc/cc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_display_item_list_impl.cc
diff --git a/cc/blink/web_display_item_list_impl.cc b/cc/blink/web_display_item_list_impl.cc
index 4941afe506232d591fe49246f932d242aa41ceaf..5cbac731862db7eb7ded1e0a76e17c21c83e314a 100644
--- a/cc/blink/web_display_item_list_impl.cc
+++ b/cc/blink/web_display_item_list_impl.cc
@@ -10,6 +10,7 @@
#include "cc/blink/web_filter_operations_impl.h"
#include "cc/resources/clip_display_item.h"
#include "cc/resources/clip_path_display_item.h"
+#include "cc/resources/compositing_display_item.h"
#include "cc/resources/drawing_display_item.h"
#include "cc/resources/filter_display_item.h"
#include "cc/resources/float_clip_display_item.h"
@@ -18,6 +19,7 @@
#include "skia/ext/refptr.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
#include "third_party/WebKit/public/platform/WebRect.h"
+#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkImageFilter.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
@@ -79,6 +81,11 @@ void WebDisplayItemListImpl::appendTransformItem(const SkMatrix44& matrix) {
display_item_list_->AppendItem(cc::TransformDisplayItem::Create(transform));
}
+void WebDisplayItemListImpl::appendEndTransformItem() {
+ display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create());
+}
+
+// TODO(pdr): Remove once there are no more callers.
void WebDisplayItemListImpl::appendTransparencyItem(
float opacity,
blink::WebBlendMode blend_mode) {
@@ -86,14 +93,23 @@ void WebDisplayItemListImpl::appendTransparencyItem(
opacity, BlendModeToSkia(blend_mode)));
}
-void WebDisplayItemListImpl::appendEndTransformItem() {
- display_item_list_->AppendItem(cc::EndTransformDisplayItem::Create());
-}
-
+// TODO(pdr): Remove once there are no more callers.
void WebDisplayItemListImpl::appendEndTransparencyItem() {
display_item_list_->AppendItem(cc::EndTransparencyDisplayItem::Create());
}
+void WebDisplayItemListImpl::appendCompositingItem(
+ float opacity,
+ SkXfermode::Mode xfermode,
+ SkColorFilter* color_filter) {
+ display_item_list_->AppendItem(cc::CompositingDisplayItem::Create(
+ opacity, xfermode, skia::SharePtr(color_filter)));
+}
+
+void WebDisplayItemListImpl::appendEndCompositingItem() {
+ display_item_list_->AppendItem(cc::EndCompositingDisplayItem::Create());
+}
+
void WebDisplayItemListImpl::appendFilterItem(
const blink::WebFilterOperations& filters,
const blink::WebFloatRect& bounds) {
« no previous file with comments | « cc/blink/web_display_item_list_impl.h ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698