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

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

Issue 1998233002: cc: Implement and use FilterOperations::MapRectReverse for mapping backdrop bounding box. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 4 years, 5 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
« no previous file with comments | « cc/output/filter_operation.cc ('k') | cc/output/filter_operations.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_ 5 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_
6 #define CC_OUTPUT_FILTER_OPERATIONS_H_ 6 #define CC_OUTPUT_FILTER_OPERATIONS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Removes all filter operations. 52 // Removes all filter operations.
53 void Clear(); 53 void Clear();
54 54
55 bool IsEmpty() const; 55 bool IsEmpty() const;
56 56
57 // Maps "forward" to determine which pixels in a destination rect are affected 57 // Maps "forward" to determine which pixels in a destination rect are affected
58 // by pixels in the source rect. 58 // by pixels in the source rect.
59 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const; 59 gfx::Rect MapRect(const gfx::Rect& rect, const SkMatrix& matrix) const;
60 60
61 // Maps "backward" to determine which pixels in the source affect the pixels
62 // in the destination rect.
63 gfx::Rect MapRectReverse(const gfx::Rect& rect, const SkMatrix& matrix) const;
64
61 void GetOutsets(int* top, int* right, int* bottom, int* left) const; 65 void GetOutsets(int* top, int* right, int* bottom, int* left) const;
62 bool HasFilterThatMovesPixels() const; 66 bool HasFilterThatMovesPixels() const;
63 bool HasFilterThatAffectsOpacity() const; 67 bool HasFilterThatAffectsOpacity() const;
64 bool HasReferenceFilter() const; 68 bool HasReferenceFilter() const;
65 69
66 size_t size() const { 70 size_t size() const {
67 return operations_.size(); 71 return operations_.size();
68 } 72 }
69 73
70 const std::vector<FilterOperation>& operations() const { return operations_; } 74 const std::vector<FilterOperation>& operations() const { return operations_; }
(...skipping 17 matching lines...) Expand all
88 92
89 void AsValueInto(base::trace_event::TracedValue* value) const; 93 void AsValueInto(base::trace_event::TracedValue* value) const;
90 94
91 private: 95 private:
92 std::vector<FilterOperation> operations_; 96 std::vector<FilterOperation> operations_;
93 }; 97 };
94 98
95 } // namespace cc 99 } // namespace cc
96 100
97 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_ 101 #endif // CC_OUTPUT_FILTER_OPERATIONS_H_
OLDNEW
« no previous file with comments | « cc/output/filter_operation.cc ('k') | cc/output/filter_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698