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

Unified Diff: cc/trees/damage_tracker.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/damage_tracker.cc
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index bed82c0079aec2be10b0956cadc40b97387f3e0c..64b15867e074497490c430de46e952c42c794e33 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -10,9 +10,9 @@
#include "cc/layers/heads_up_display_layer_impl.h"
#include "cc/layers/layer_impl.h"
#include "cc/layers/render_surface_impl.h"
+#include "cc/output/filter_operations.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_impl.h"
-#include "third_party/WebKit/public/platform/WebFilterOperations.h"
namespace cc {
@@ -27,16 +27,16 @@ DamageTracker::DamageTracker()
DamageTracker::~DamageTracker() {}
static inline void ExpandRectWithFilters(
- gfx::RectF* rect, const WebKit::WebFilterOperations& filters) {
+ gfx::RectF* rect, const FilterOperations& filters) {
int top, right, bottom, left;
- filters.getOutsets(top, right, bottom, left);
+ filters.GetOutsets(&top, &right, &bottom, &left);
rect->Inset(-left, -top, -right, -bottom);
}
static inline void ExpandDamageRectInsideRectWithFilters(
gfx::RectF* damage_rect,
const gfx::RectF& pre_filter_rect,
- const WebKit::WebFilterOperations& filters) {
+ const FilterOperations& filters) {
gfx::RectF expanded_damage_rect = *damage_rect;
ExpandRectWithFilters(&expanded_damage_rect, filters);
gfx::RectF filter_rect = pre_filter_rect;
@@ -52,7 +52,7 @@ void DamageTracker::UpdateDamageTrackingState(
bool target_surface_property_changed_only_from_descendant,
gfx::Rect target_surface_content_rect,
LayerImpl* target_surface_mask_layer,
- const WebKit::WebFilterOperations& filters,
+ const FilterOperations& filters,
SkImageFilter* filter) {
//
// This function computes the "damage rect" of a target surface, and updates
@@ -143,7 +143,7 @@ void DamageTracker::UpdateDamageTrackingState(
damage_rect_for_this_update.Union(damage_from_surface_mask);
damage_rect_for_this_update.Union(damage_from_leftover_rects);
- if (filters.hasFilterThatMovesPixels()) {
+ if (filters.HasFilterThatMovesPixels()) {
ExpandRectWithFilters(&damage_rect_for_this_update, filters);
} else if (filter) {
// TODO(senorblanco): Once SkImageFilter reports its outsets, use
@@ -390,7 +390,7 @@ void DamageTracker::ExtendDamageForRenderSurface(
// those pixels from the surface with only the contents of layers below this
// one in them. This means we need to redraw any pixels in the surface being
// used for the blur in this layer this frame.
- if (layer->background_filters().hasFilterThatMovesPixels()) {
+ if (layer->background_filters().HasFilterThatMovesPixels()) {
ExpandDamageRectInsideRectWithFilters(target_damage_rect,
surface_rect_in_target_space,
layer->background_filters());
« no previous file with comments | « cc/trees/damage_tracker.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698