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

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

Issue 1758113004: cc: ImageDecodes: Move ImageHijackCanvas to a separate file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disallow_copy_and_assign 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 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
6 #define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_
7
8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/utils/SkNWayCanvas.h"
11
12 namespace cc {
13
14 class ImageDecodeController;
15
16 // TODO(vmpstr): Convert this to SkCanvas override and plumb through the raster
17 // pipeline.
18 class ImageHijackCanvas : public SkNWayCanvas {
19 public:
20 ImageHijackCanvas(int width,
21 int height,
22 ImageDecodeController* image_decode_controller);
23
24 private:
25 // Ensure that pictures are unpacked by this canvas, instead of being
26 // forwarded to the raster canvas.
27 void onDrawPicture(const SkPicture* picture,
28 const SkMatrix* matrix,
29 const SkPaint* paint) override;
30
31 void onDrawImage(const SkImage* image,
32 SkScalar x,
33 SkScalar y,
34 const SkPaint* paint) override;
35 void onDrawImageRect(const SkImage* image,
36 const SkRect* src,
37 const SkRect& dst,
38 const SkPaint* paint,
39 SrcRectConstraint constraint) override;
40 void onDrawImageNine(const SkImage* image,
41 const SkIRect& center,
42 const SkRect& dst,
43 const SkPaint* paint) override;
44
45 ImageDecodeController* image_decode_controller_;
46
47 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas);
48 };
49
50 } // namespace cc
51
52 #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