Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / cc / output / filter_operations.cc
index 16a0040..dcdd480 100644 (file)
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include <cmath>
-
 #include "cc/output/filter_operations.h"
 
+#include <cmath>
+
+#include "base/debug/trace_event_argument.h"
 #include "base/values.h"
 #include "cc/output/filter_operation.h"
 
@@ -102,6 +103,7 @@ bool FilterOperations::HasFilterThatMovesPixels() const {
       case FilterOperation::BRIGHTNESS:
       case FilterOperation::CONTRAST:
       case FilterOperation::SATURATING_BRIGHTNESS:
+      case FilterOperation::ALPHA_THRESHOLD:
         break;
     }
   }
@@ -119,6 +121,7 @@ bool FilterOperations::HasFilterThatAffectsOpacity() const {
       case FilterOperation::DROP_SHADOW:
       case FilterOperation::ZOOM:
       case FilterOperation::REFERENCE:
+      case FilterOperation::ALPHA_THRESHOLD:
         return true;
       case FilterOperation::COLOR_MATRIX: {
         const SkScalar* matrix = op.matrix();
@@ -194,11 +197,12 @@ FilterOperations FilterOperations::Blend(const FilterOperations& from,
   return blended_filters;
 }
 
-scoped_ptr<base::Value> FilterOperations::AsValue() const {
-  scoped_ptr<base::ListValue> value(new base::ListValue);
-  for (size_t i = 0; i < operations_.size(); ++i)
-    value->Append(operations_[i].AsValue().release());
-  return value.PassAs<base::Value>();
+void FilterOperations::AsValueInto(base::debug::TracedValue* value) const {
+  for (size_t i = 0; i < operations_.size(); ++i) {
+    value->BeginDictionary();
+    operations_[i].AsValueInto(value);
+    value->EndDictionary();
+  }
 }
 
 }  // namespace cc