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

Side by Side Diff: cc/paint/skia_paint_canvas.h

Issue 2812763002: paint: Introduce PaintImage that wraps SkImage in paint calls. (Closed)
Patch Set: update Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PAINT_SKIA_PAINT_CANVAS_H_ 5 #ifndef CC_PAINT_SKIA_PAINT_CANVAS_H_
6 #define CC_PAINT_SKIA_PAINT_CANVAS_H_ 6 #define CC_PAINT_SKIA_PAINT_CANVAS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void drawArc(const SkRect& oval, 90 void drawArc(const SkRect& oval,
91 SkScalar start_angle, 91 SkScalar start_angle,
92 SkScalar sweep_angle, 92 SkScalar sweep_angle,
93 bool use_center, 93 bool use_center,
94 const PaintFlags& flags) override; 94 const PaintFlags& flags) override;
95 void drawRoundRect(const SkRect& rect, 95 void drawRoundRect(const SkRect& rect,
96 SkScalar rx, 96 SkScalar rx,
97 SkScalar ry, 97 SkScalar ry,
98 const PaintFlags& flags) override; 98 const PaintFlags& flags) override;
99 void drawPath(const SkPath& path, const PaintFlags& flags) override; 99 void drawPath(const SkPath& path, const PaintFlags& flags) override;
100 void drawImage(sk_sp<const SkImage> image, 100 void drawImage(const PaintImage& image,
101 SkScalar left, 101 SkScalar left,
102 SkScalar top, 102 SkScalar top,
103 const PaintFlags* flags) override; 103 const PaintFlags* flags) override;
104 void drawImageRect(sk_sp<const SkImage> image, 104 void drawImageRect(const PaintImage& image,
105 const SkRect& src, 105 const SkRect& src,
106 const SkRect& dst, 106 const SkRect& dst,
107 const PaintFlags* flags, 107 const PaintFlags* flags,
108 SrcRectConstraint constraint) override; 108 SrcRectConstraint constraint) override;
109 void drawBitmap(const SkBitmap& bitmap, 109 void drawBitmap(const SkBitmap& bitmap,
110 SkScalar left, 110 SkScalar left,
111 SkScalar top, 111 SkScalar top,
112 const PaintFlags* flags) override; 112 const PaintFlags* flags) override;
113 113
114 void drawText(const void* text, 114 void drawText(const void* text,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 private: 156 private:
157 SkCanvas* canvas_; 157 SkCanvas* canvas_;
158 std::unique_ptr<SkCanvas> owned_; 158 std::unique_ptr<SkCanvas> owned_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas); 160 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas);
161 }; 161 };
162 162
163 } // namespace cc 163 } // namespace cc
164 164
165 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ 165 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698