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

Unified Diff: cc/playback/image_hijack_canvas.h

Issue 2668873002: cc: Add checker-imaging support to TileManager. (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: cc/playback/image_hijack_canvas.h
diff --git a/cc/playback/image_hijack_canvas.h b/cc/playback/image_hijack_canvas.h
index be9a6ba9c3a5527ed928a89864305e0a3021c511..e828f5611f61f2ca9b24ec8d41bed370c3976a08 100644
--- a/cc/playback/image_hijack_canvas.h
+++ b/cc/playback/image_hijack_canvas.h
@@ -5,8 +5,11 @@
#ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
#define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
+#include <unordered_set>
+
#include "base/macros.h"
#include "cc/base/cc_export.h"
+#include "cc/playback/image_id.h"
#include "third_party/skia/include/utils/SkNWayCanvas.h"
namespace cc {
@@ -17,7 +20,8 @@ class CC_EXPORT ImageHijackCanvas : public SkNWayCanvas {
public:
ImageHijackCanvas(int width,
int height,
- ImageDecodeCache* image_decode_cache);
+ ImageDecodeCache* image_decode_cache,
+ const std::unordered_set<ImageId>* images_to_skip);
vmpstr 2017/02/10 19:25:42 maybe use base::flat_set here? Or vector? I feel l
Khushal 2017/02/10 22:09:19 Done. So other cases where we have sets are in Che
private:
// Ensure that pictures are unpacked by this canvas, instead of being
@@ -48,7 +52,10 @@ class CC_EXPORT ImageHijackCanvas : public SkNWayCanvas {
const SkRect& dst,
const SkPaint* paint) override;
+ bool ShouldSkipImage(const SkImage* image);
+
ImageDecodeCache* image_decode_cache_;
+ const std::unordered_set<ImageId>* images_to_skip_;
DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas);
};

Powered by Google App Engine
This is Rietveld 408576698