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

Unified Diff: cc/playback/discardable_image_map.h

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: Merge branch 'master' into ccpaint Created 3 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/playback/decoded_draw_image.cc ('k') | cc/playback/discardable_image_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/discardable_image_map.h
diff --git a/cc/playback/discardable_image_map.h b/cc/playback/discardable_image_map.h
deleted file mode 100644
index abbf08bc0e7a52b4e767c96ccfbf280f2a5e9443..0000000000000000000000000000000000000000
--- a/cc/playback/discardable_image_map.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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_PLAYBACK_DISCARDABLE_IMAGE_MAP_H_
-#define CC_PLAYBACK_DISCARDABLE_IMAGE_MAP_H_
-
-#include <unordered_map>
-#include <utility>
-#include <vector>
-
-#include "cc/base/cc_export.h"
-#include "cc/base/rtree.h"
-#include "cc/playback/draw_image.h"
-#include "cc/playback/image_id.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/geometry/size.h"
-
-namespace cc {
-
-// Helper function to apply the matrix to the rect and return the result.
-SkRect MapRect(const SkMatrix& matrix, const SkRect& src);
-
-// This class is used for generating discardable images data (see DrawImage
-// for the type of data it stores). It allows the client to query a particular
-// rect and get back a list of DrawImages in that rect.
-class CC_EXPORT DiscardableImageMap {
- public:
- class CC_EXPORT ScopedMetadataGenerator {
- public:
- ScopedMetadataGenerator(DiscardableImageMap* image_map,
- const gfx::Size& bounds);
- ~ScopedMetadataGenerator();
-
- SkCanvas* canvas() { return metadata_canvas_.get(); }
-
- private:
- DiscardableImageMap* image_map_;
- std::unique_ptr<SkCanvas> metadata_canvas_;
- };
-
- DiscardableImageMap();
- ~DiscardableImageMap();
-
- bool empty() const { return all_images_.empty(); }
- void GetDiscardableImagesInRect(const gfx::Rect& rect,
- float contents_scale,
- std::vector<DrawImage>* images) const;
- gfx::Rect GetRectForImage(ImageId image_id) const;
-
- private:
- friend class ScopedMetadataGenerator;
- friend class DiscardableImageMapTest;
-
- std::unique_ptr<SkCanvas> BeginGeneratingMetadata(const gfx::Size& bounds);
- void EndGeneratingMetadata();
-
- std::vector<std::pair<DrawImage, gfx::Rect>> all_images_;
- std::unordered_map<ImageId, gfx::Rect> image_id_to_rect_;
-
- RTree images_rtree_;
-};
-
-} // namespace cc
-
-#endif // CC_PLAYBACK_DISCARDABLE_IMAGE_MAP_H_
« no previous file with comments | « cc/playback/decoded_draw_image.cc ('k') | cc/playback/discardable_image_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698