[go: nahoru, domu]

Remove PlaybackPaintRecord function

This function was added temporarily to work around the extra clip that
SkCanvas::drawPicture adds and to turn calls into playback in this
patch: https://codereview.chromium.org/2755183002

As PaintRecord is now its own class and is not an SkPicture, these
functions can all change back to drawPicture.  The underlying derived
types in SkiaPaintCanvas and PaintOpBuffer call playback instead of
drawPicture so this is a noop.

This patch is just cleaning up a confusing helper that's not needed.

Bug: 702577
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I45746132861b23e799995c83d2e58dee1c0ee10d
Reviewed-on: https://chromium-review.googlesource.com/498855
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#471201}
diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h
index e1fa9d0..b6f4c58 100644
--- a/cc/paint/paint_canvas.h
+++ b/cc/paint/paint_canvas.h
@@ -166,6 +166,8 @@
   virtual void drawDisplayItemList(
       scoped_refptr<DisplayItemList> display_item_list) = 0;
 
+  // Unlike SkCanvas::drawPicture, this only plays back the PaintRecord and does
+  // not add an additional clip.  This is closer to SkPicture::playback.
   virtual void drawPicture(sk_sp<const PaintRecord> record) = 0;
 
   virtual bool isClipEmpty() const = 0;
@@ -181,14 +183,6 @@
                         const SkRect& rect,
                         sk_sp<SkData> data) = 0;
 
-  // TODO(enne): maybe this should live on PaintRecord, but that's not
-  // possible when PaintRecord is a typedef.
-  virtual void PlaybackPaintRecord(sk_sp<const PaintRecord> record) = 0;
-
- protected:
-  friend class PaintSurface;
-  friend class PaintRecorder;
-
  private:
   DISALLOW_COPY_AND_ASSIGN(PaintCanvas);
 };
@@ -222,11 +216,6 @@
   int save_count_ = 0;
 };
 
-// TODO(enne): Move all these functions into PaintCanvas.  These are only
-// separate now to make the transition to concrete types easier by keeping
-// the base PaintCanvas type equivalent to the SkCanvas interface and
-// all these helper functions potentially operating on both.
-
 // Following routines are used in print preview workflow to mark the
 // preview metafile.
 #if defined(OS_MACOSX)