 Chromium Code Reviews
 Chromium Code Reviews Issue 16968002:
  Move implementation of WebFilterOperations into cc  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 16968002:
  Move implementation of WebFilterOperations into cc  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: cc/output/filter_operations.h | 
| diff --git a/cc/output/filter_operations.h b/cc/output/filter_operations.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..340e6c0f23dfaea2f7b858e8d3599958a0a6411e | 
| --- /dev/null | 
| +++ b/cc/output/filter_operations.h | 
| @@ -0,0 +1,58 @@ | 
| +// Copyright 2013 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef CC_OUTPUT_FILTER_OPERATIONS_H_ | 
| +#define CC_OUTPUT_FILTER_OPERATIONS_H_ | 
| + | 
| +#include <vector> | 
| + | 
| +#include "base/logging.h" | 
| +#include "cc/output/filter_operation.h" | 
| + | 
| +namespace cc { | 
| + | 
| +// An ordered list of filter operations. | 
| +class CC_EXPORT FilterOperations { | 
| + public: | 
| + FilterOperations(); | 
| + | 
| + FilterOperations(const FilterOperations& other); | 
| + | 
| + ~FilterOperations(); | 
| + | 
| + FilterOperations& operator=(const FilterOperations& other); | 
| + | 
| + bool operator==(const FilterOperations& other) const; | 
| + | 
| + bool operator!=(const FilterOperations& other) const { | 
| + return !(*this == other); | 
| + } | 
| + | 
| + void Append(const FilterOperation& filter); | 
| + | 
| + // Removes all filter operations. | 
| + void Clear(); | 
| + | 
| + bool IsEmpty() const; | 
| + | 
| + void GetOutsets(int* top, int* right, int* bottom, int* left) const; | 
| + bool HasFilterThatMovesPixels() const; | 
| + bool HasFilterThatAffectsOpacity() const; | 
| + | 
| + size_t size() const { | 
| + return operations_.size(); | 
| + } | 
| + | 
| + FilterOperation at(size_t index) const { | 
| + DCHECK(index < size()); | 
| 
jamesr
2013/06/18 23:08:52
DCHECK_LT
 
ajuma
2013/06/19 17:08:30
Done.
 | 
| + return operations_[index]; | 
| + } | 
| + | 
| + private: | 
| + std::vector<FilterOperation> operations_; | 
| +}; | 
| + | 
| +} // namespace cc | 
| + | 
| +#endif // CC_OUTPUT_FILTER_OPERATIONS_H_ |