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

Side by Side Diff: cc/playback/image_hijack_canvas.h

Issue 1839143004: Limit image filtering during scale animations Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/image_hijack_canvas.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/utils/SkNWayCanvas.h" 10 #include "third_party/skia/include/utils/SkNWayCanvas.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class ImageDecodeController; 14 class ImageDecodeController;
15 15
16 class ImageHijackCanvas : public SkNWayCanvas { 16 class ImageHijackCanvas : public SkNWayCanvas {
17 public: 17 public:
18 ImageHijackCanvas(int width, 18 ImageHijackCanvas(int width,
19 int height, 19 int height,
20 ImageDecodeController* image_decode_controller); 20 ImageDecodeController* image_decode_controller,
21 SkFilterQuality max_quality);
21 22
22 private: 23 private:
23 // Ensure that pictures are unpacked by this canvas, instead of being 24 // Ensure that pictures are unpacked by this canvas, instead of being
24 // forwarded to the raster canvas. 25 // forwarded to the raster canvas.
25 void onDrawPicture(const SkPicture* picture, 26 void onDrawPicture(const SkPicture* picture,
26 const SkMatrix* matrix, 27 const SkMatrix* matrix,
27 const SkPaint* paint) override; 28 const SkPaint* paint) override;
28 29
29 void onDrawImage(const SkImage* image, 30 void onDrawImage(const SkImage* image,
30 SkScalar x, 31 SkScalar x,
31 SkScalar y, 32 SkScalar y,
32 const SkPaint* paint) override; 33 const SkPaint* paint) override;
33 void onDrawImageRect(const SkImage* image, 34 void onDrawImageRect(const SkImage* image,
34 const SkRect* src, 35 const SkRect* src,
35 const SkRect& dst, 36 const SkRect& dst,
36 const SkPaint* paint, 37 const SkPaint* paint,
37 SrcRectConstraint constraint) override; 38 SrcRectConstraint constraint) override;
38 void onDrawImageNine(const SkImage* image, 39 void onDrawImageNine(const SkImage* image,
39 const SkIRect& center, 40 const SkIRect& center,
40 const SkRect& dst, 41 const SkRect& dst,
41 const SkPaint* paint) override; 42 const SkPaint* paint) override;
42 43
43 ImageDecodeController* image_decode_controller_; 44 ImageDecodeController* image_decode_controller_;
44 45
46 SkFilterQuality max_quality_;
47
45 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas); 48 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas);
46 }; 49 };
47 50
48 } // namespace cc 51 } // namespace cc
49 52
50 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ 53 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
OLDNEW
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/image_hijack_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698