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

Side by Side Diff: cc/output/filter_operations.h

Issue 16968002: Move implementation of WebFilterOperations into cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_
6 #define CC_OUTPUT_FILTER_OPERATIONS_H_
7
8 #include <vector>
9
10 #include "base/logging.h"
11 #include "cc/output/filter_operation.h"
12
13 namespace cc {
14
15 // An ordered list of filter operations.
16 class CC_EXPORT FilterOperations {
17 public:
18 FilterOperations();
19
20 FilterOperations(const FilterOperations& other);
21
22 ~FilterOperations();
23
24 FilterOperations& operator=(const FilterOperations& other);
25
26 bool operator==(const FilterOperations& other) const;
27
28 bool operator!=(const FilterOperations& other) const {
29 return !(*this == other);
30 }
31
32 void Append(const FilterOperation& filter);
33
34 // Removes all filter operations.
35 void Clear();
36
37 bool IsEmpty() const;
38
39 void GetOutsets(int* top, int* right, int* bottom, int* left) const;
40 bool HasFilterThatMovesPixels() const;
41 bool HasFilterThatAffectsOpacity() const;
42
43 size_t size() const {
44 return operations_.size();
45 }
46
47 FilterOperation at(size_t index) const {
48 DCHECK(index < size());
jamesr 2013/06/18 23:08:52 DCHECK_LT
ajuma 2013/06/19 17:08:30 Done.
49 return operations_[index];
50 }
51
52 private:
53 std::vector<FilterOperation> operations_;
54 };
55
56 } // namespace cc
57
58 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698