Index: ui/compositor/paint_recorder.cc |
diff --git a/ui/compositor/paint_recorder.cc b/ui/compositor/paint_recorder.cc |
index 2c01e5c43d9c9f41835f99f91c3e8ea54b876a58..798eb6eb3f588ab3e4566379503612f4c28e462c 100644 |
--- a/ui/compositor/paint_recorder.cc |
+++ b/ui/compositor/paint_recorder.cc |
@@ -18,11 +18,14 @@ PaintRecorder::PaintRecorder(const PaintContext& context, |
const gfx::Size& recording_size, |
PaintCache* cache) |
: context_(context), |
- // The SkCanvas reference returned by beginRecording is shared with |
- // the recorder_ so no need to store a RefPtr to it on this class, we just |
- // store the gfx::Canvas. |
- canvas_(sk_ref_sp(context.recorder_->beginRecording( |
- gfx::RectToSkRect(gfx::Rect(recording_size)))), |
+ // The SkCanvas pointer returned by beginRecording is owned by the |
+ // recorder_ |
danakj
2016/11/14 20:59:56
fix wrapping please
reed1
2016/11/14 21:28:51
Done.
|
+ // so no need to store a RefPtr to it on this class, we just store the |
danakj
2016/11/14 20:59:56
Hm this is still referring to RefPtr.
How about s
reed1
2016/11/14 21:28:51
New comment uploaded, that also references cache,
|
+ // gfx::Canvas. |
+ // The caller must ensure that the PaintContext's recorder_ outlives this |
+ // object. |
+ canvas_(context.recorder_->beginRecording( |
+ gfx::RectToSkRect(gfx::Rect(recording_size))), |
context.device_scale_factor_), |
cache_(cache), |
bounds_in_layer_(context.ToLayerSpaceBounds(recording_size)) { |