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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ 5 #ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
6 #define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ 6 #define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
7 7
8 #include <unordered_set>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/playback/image_id.h"
10 #include "third_party/skia/include/utils/SkNWayCanvas.h" 13 #include "third_party/skia/include/utils/SkNWayCanvas.h"
11 14
12 namespace cc { 15 namespace cc {
13 16
14 class ImageDecodeCache; 17 class ImageDecodeCache;
15 18
16 class CC_EXPORT ImageHijackCanvas : public SkNWayCanvas { 19 class CC_EXPORT ImageHijackCanvas : public SkNWayCanvas {
17 public: 20 public:
18 ImageHijackCanvas(int width, 21 ImageHijackCanvas(int width,
19 int height, 22 int height,
20 ImageDecodeCache* image_decode_cache); 23 ImageDecodeCache* image_decode_cache,
24 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
21 25
22 private: 26 private:
23 // Ensure that pictures are unpacked by this canvas, instead of being 27 // Ensure that pictures are unpacked by this canvas, instead of being
24 // forwarded to the raster canvas. 28 // forwarded to the raster canvas.
25 void onDrawPicture(const SkPicture* picture, 29 void onDrawPicture(const SkPicture* picture,
26 const SkMatrix* matrix, 30 const SkMatrix* matrix,
27 const SkPaint* paint) override; 31 const SkPaint* paint) override;
28 void onDrawImage(const SkImage* image, 32 void onDrawImage(const SkImage* image,
29 SkScalar x, 33 SkScalar x,
30 SkScalar y, 34 SkScalar y,
(...skipping 10 matching lines...) Expand all
41 SkScalar start_angle, 45 SkScalar start_angle,
42 SkScalar sweep_angle, 46 SkScalar sweep_angle,
43 bool use_center, 47 bool use_center,
44 const SkPaint& paint) override; 48 const SkPaint& paint) override;
45 void onDrawRRect(const SkRRect& rr, const SkPaint& paint) override; 49 void onDrawRRect(const SkRRect& rr, const SkPaint& paint) override;
46 void onDrawImageNine(const SkImage* image, 50 void onDrawImageNine(const SkImage* image,
47 const SkIRect& center, 51 const SkIRect& center,
48 const SkRect& dst, 52 const SkRect& dst,
49 const SkPaint* paint) override; 53 const SkPaint* paint) override;
50 54
55 bool ShouldSkipImage(const SkImage* image);
56
51 ImageDecodeCache* image_decode_cache_; 57 ImageDecodeCache* image_decode_cache_;
58 const std::unordered_set<ImageId>* images_to_skip_;
52 59
53 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas); 60 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas);
54 }; 61 };
55 62
56 } // namespace cc 63 } // namespace cc
57 64
58 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ 65 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698