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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 2544203003: Delete old RenderPassId mappings in SurfaceAggregator. (Closed)
Patch Set: minor change Created 4 years 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 | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | cc/surfaces/surface_aggregator_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.h
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index ae8f4883cfb3330f38f3647a43b3685706804ba8..4d614cf1a30e99f948effe64559c76be98948306 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -5,6 +5,7 @@
#ifndef CC_SURFACES_SURFACE_AGGREGATOR_H_
#define CC_SURFACES_SURFACE_AGGREGATOR_H_
+#include <map>
#include <memory>
#include <set>
#include <unordered_map>
@@ -62,6 +63,12 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
bool may_contain_video = false;
};
+ struct RenderPassInfo {
+ RenderPassId id;
danakj 2016/12/02 21:55:16 This can use some comments. The key already has an
+ // This is true if the pass was used in the last aggregated frame.
+ bool in_use = true;
+ };
+
ClipData CalculateClipRect(const ClipData& surface_clip,
const ClipData& quad_clip,
const gfx::Transform& target_transform);
@@ -108,11 +115,8 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
SurfaceManager* manager_;
ResourceProvider* provider_;
- class RenderPassIdAllocator;
using RenderPassIdAllocatorMap =
- std::unordered_map<SurfaceId,
- std::unique_ptr<RenderPassIdAllocator>,
- SurfaceIdHash>;
+ std::map<std::pair<SurfaceId, RenderPassId>, RenderPassInfo>;
danakj 2016/12/02 21:55:16 Same.. comments pls
RenderPassIdAllocatorMap render_pass_allocator_map_;
int next_render_pass_id_;
const bool aggregate_only_damaged_;
« no previous file with comments | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | cc/surfaces/surface_aggregator_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698