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

Unified Diff: cc/trees/damage_tracker.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/blocking_task_runner_unittest.cc ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/damage_tracker.h
diff --git a/cc/trees/damage_tracker.h b/cc/trees/damage_tracker.h
deleted file mode 100644
index aafbd033bcd0d0823a487e0390427920c7b7b4ce..0000000000000000000000000000000000000000
--- a/cc/trees/damage_tracker.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2011 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_TREES_DAMAGE_TRACKER_H_
-#define CC_TREES_DAMAGE_TRACKER_H_
-
-#include <vector>
-#include "base/memory/scoped_ptr.h"
-#include "cc/base/cc_export.h"
-#include "cc/layers/layer_lists.h"
-#include "ui/gfx/geometry/rect.h"
-
-class SkImageFilter;
-
-namespace gfx {
-class Rect;
-}
-
-namespace cc {
-
-class FilterOperations;
-class LayerImpl;
-class RenderSurfaceImpl;
-
-// Computes the region where pixels have actually changed on a
-// RenderSurfaceImpl. This region is used to scissor what is actually drawn to
-// the screen to save GPU computation and bandwidth.
-class CC_EXPORT DamageTracker {
- public:
- static scoped_ptr<DamageTracker> Create();
- ~DamageTracker();
-
- void DidDrawDamagedArea() { current_damage_rect_ = gfx::Rect(); }
- void AddDamageNextUpdate(const gfx::Rect& dmg) {
- current_damage_rect_.Union(dmg);
- }
- void UpdateDamageTrackingState(
- const LayerImplList& layer_list,
- int target_surface_layer_id,
- bool target_surface_property_changed_only_from_descendant,
- const gfx::Rect& target_surface_content_rect,
- LayerImpl* target_surface_mask_layer,
- const FilterOperations& filters);
-
- gfx::Rect current_damage_rect() { return current_damage_rect_; }
-
- private:
- DamageTracker();
-
- gfx::Rect TrackDamageFromActiveLayers(const LayerImplList& layer_list,
- int target_surface_layer_id);
- gfx::Rect TrackDamageFromSurfaceMask(LayerImpl* target_surface_mask_layer);
- gfx::Rect TrackDamageFromLeftoverRects();
-
- void PrepareRectHistoryForUpdate();
-
- // These helper functions are used only in TrackDamageFromActiveLayers().
- void ExtendDamageForLayer(LayerImpl* layer, gfx::Rect* target_damage_rect);
- void ExtendDamageForRenderSurface(LayerImpl* layer,
- gfx::Rect* target_damage_rect);
-
- struct RectMapData {
- RectMapData() : layer_id_(0), mailboxId_(0) {}
- explicit RectMapData(int layer_id) : layer_id_(layer_id), mailboxId_(0) {}
- void Update(const gfx::Rect& rect, unsigned int mailboxId) {
- mailboxId_ = mailboxId;
- rect_ = rect;
- }
-
- bool operator < (const RectMapData& other) const {
- return layer_id_ < other.layer_id_;
- }
-
- int layer_id_;
- unsigned int mailboxId_;
- gfx::Rect rect_;
- };
- typedef std::vector<RectMapData> SortedRectMap;
-
- RectMapData& RectDataForLayer(int layer_id, bool* layer_is_new);
-
- SortedRectMap rect_history_;
-
- unsigned int mailboxId_;
- gfx::Rect current_damage_rect_;
-
- DISALLOW_COPY_AND_ASSIGN(DamageTracker);
-};
-
-} // namespace cc
-
-#endif // CC_TREES_DAMAGE_TRACKER_H_
« no previous file with comments | « cc/trees/blocking_task_runner_unittest.cc ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698