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

Unified Diff: cc/playback/skip_image_canvas.h

Issue 1799883002: cc: Refactor SkipImageCanvas and create it during playback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: cc/playback/skip_image_canvas.h
diff --git a/cc/playback/skip_image_canvas.h b/cc/playback/skip_image_canvas.h
new file mode 100644
index 0000000000000000000000000000000000000000..67206b7cb91991b73225ef89506c5aeca187b9bb
--- /dev/null
+++ b/cc/playback/skip_image_canvas.h
@@ -0,0 +1,26 @@
+// Copyright 2016 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_SKIP_IMAGE_CANVAS_H_
+#define CC_PLAYBACK_SKIP_IMAGE_CANVAS_H_
+
+#include "third_party/skia/include/utils/SkPaintFilterCanvas.h"
+
+namespace cc {
+
+class SkipImageCanvas : public SkPaintFilterCanvas {
+ public:
+ explicit SkipImageCanvas(SkCanvas* canvas);
+
+ private:
+ bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const override;
+
+ void onDrawPicture(const SkPicture* picture,
+ const SkMatrix* matrix,
+ const SkPaint* paint) override;
+};
+
+} // namespace cc
+
+#endif // CC_PLAYBACK_SKIP_IMAGE_CANVAS_H_

Powered by Google App Engine
This is Rietveld 408576698