move files out of private, and fix up callers to IWYU
authorMike Reed <reed@google.com>
Tue, 16 May 2017 14:39:06 +0000 (10:39 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 16 May 2017 21:29:03 +0000 (21:29 +0000)
Realized that a pending CL needed to add (yet another) private type to SkRecords.h, but w/o this CL I'd be forced to move that header also into private. This change frees us up to not have transitive exposure for types that need to be recorded.

Bug: skia:
Change-Id: Id79f1c2e44ba85e063c1360cf96c92de6397ca2b
Reviewed-on: https://skia-review.googlesource.com/17031
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
17 files changed:
fuzz/FilterFuzz.cpp
fuzz/FuzzCanvas.cpp
gm/distantclip.cpp
gm/filterfastbounds.cpp
gm/multipicturedraw.cpp
gm/picture.cpp
gm/pictureimagegenerator.cpp
gn/core.gni
include/core/SkPictureRecorder.h
samplecode/GMSampleView.cpp
samplecode/SampleFilterFuzz.cpp
src/core/SkMiniRecorder.h [moved from include/private/SkMiniRecorder.h with 100% similarity]
src/core/SkPictureRecorder.cpp
src/core/SkRecords.h [moved from include/private/SkRecords.h with 100% similarity]
tests/ImageGeneratorTest.cpp
tests/ImageIsOpaqueTest.cpp
tests/RecordingXfermodeTest.cpp

index cf65701..b2d99b7 100644 (file)
@@ -39,6 +39,7 @@
 #include "SkPictureRecorder.h"
 #include "SkPoint3.h"
 #include "SkRandom.h"
+#include "SkRegion.h"
 #include "SkTableColorFilter.h"
 #include "SkTileImageFilter.h"
 #include "SkTypeface.h"
index 3796812..aec9173 100644 (file)
@@ -54,6 +54,7 @@
 #include "SkPictureImageFilter.h"
 #include "SkRRectsGaussianEdgeMaskFilter.h"
 #include "SkTableColorFilter.h"
+#include "SkTextBlob.h"
 #include "SkTileImageFilter.h"
 #include "SkXfermodeImageFilter.h"
 
index 24fbaca..fa75265 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "gm.h"
 #include "SkCanvas.h"
+#include "SkPath.h"
 #include "SkPicture.h"
 #include "SkPictureRecorder.h"
 
index 5102b86..ad042ac 100644 (file)
@@ -11,6 +11,7 @@
 #include "SkDropShadowImageFilter.h"
 #include "SkImageSource.h"
 #include "SkOffsetImageFilter.h"
+#include "SkPath.h"
 #include "SkPictureImageFilter.h"
 #include "SkPictureRecorder.h"
 #include "SkRandom.h"
index fe2281a..b18fb8a 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "SkColorFilter.h"
 #include "SkMultiPictureDraw.h"
+#include "SkPath.h"
 #include "SkPictureRecorder.h"
 #include "SkSurface.h"
 
index 72d4159..5b3cdfb 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "gm.h"
 #include "SkPaint.h"
+#include "SkPath.h"
 #include "SkPictureRecorder.h"
 
 static sk_sp<SkPicture> make_picture() {
index a54fa64..4e465d1 100644 (file)
@@ -12,6 +12,7 @@
 #include "SkGradientShader.h"
 #include "SkImageGenerator.h"
 #include "SkPaint.h"
+#include "SkPath.h"
 #include "SkPathOps.h"
 #include "SkPicture.h"
 #include "SkPictureRecorder.h"
index 1d88821..5566dde 100644 (file)
@@ -207,6 +207,7 @@ skia_core_sources = [
   "$_src/core/SkMipMap.cpp",
   "$_src/core/SkMipMap.h",
   "$_src/core/SkMiniRecorder.cpp",
+  "$_src/core/SkMiniRecorder.h",
   "$_src/core/SkModeColorFilter.cpp",
   "$_src/core/SkMultiPictureDraw.cpp",
   "$_src/core/SkNextID.h",
@@ -271,6 +272,7 @@ skia_core_sources = [
   "$_src/core/SkReader32.h",
   "$_src/core/SkRecord.cpp",
   "$_src/core/SkRecords.cpp",
+  "$_src/core/SkRecords.h",
   "$_src/core/SkRecordDraw.cpp",
   "$_src/core/SkRecordOpts.cpp",
   "$_src/core/SkRecordOpts.h",
@@ -456,10 +458,8 @@ skia_core_sources = [
   "$_include/private/SkFloatingPoint.h",
   "$_include/private/SkMalloc.h",
   "$_include/private/SkMessageBus.h",
-  "$_include/private/SkMiniRecorder.h",
   "$_include/private/SkMutex.h",
   "$_include/private/SkOnce.h",
-  "$_include/private/SkRecords.h",
   "$_include/private/SkSemaphore.h",
   "$_include/private/SkShadowFlags.h",
   "$_include/private/SkSpinlock.h",
index d898b91..09839cb 100644 (file)
@@ -8,7 +8,6 @@
 #ifndef SkPictureRecorder_DEFINED
 #define SkPictureRecorder_DEFINED
 
-#include "../private/SkMiniRecorder.h"
 #include "SkBBHFactory.h"
 #include "SkPicture.h"
 #include "SkRefCnt.h"
@@ -22,6 +21,7 @@ namespace android {
 class GrContext;
 class SkCanvas;
 class SkDrawable;
+class SkMiniRecorder;
 class SkPictureRecord;
 class SkRecord;
 class SkRecorder;
@@ -116,7 +116,7 @@ private:
     sk_sp<SkBBoxHierarchy>      fBBH;
     std::unique_ptr<SkRecorder> fRecorder;
     sk_sp<SkRecord>             fRecord;
-    SkMiniRecorder              fMiniRecorder;
+    std::unique_ptr<SkMiniRecorder> fMiniRecorder;
 
     typedef SkNoncopyable INHERITED;
 };
index 19cbcc8..ffa33ce 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "GMSampleView.h"
+#include "SkData.h"
 
 GMSampleView::GMSampleView(GM* gm) : fShowSize(false), fGM(gm) {}
 
index 3690612..7254192 100644 (file)
@@ -39,6 +39,7 @@
 #include "SkPictureRecorder.h"
 #include "SkPoint3.h"
 #include "SkRandom.h"
+#include "SkRegion.h"
 #include "SkTableColorFilter.h"
 #include "SkTileImageFilter.h"
 #include "SkTypeface.h"
index 7abb12b..a37cd48 100644 (file)
@@ -8,6 +8,7 @@
 #include "SkBigPicture.h"
 #include "SkData.h"
 #include "SkDrawable.h"
+#include "SkMiniRecorder.h"
 #include "SkPictureRecorder.h"
 #include "SkRecord.h"
 #include "SkRecordDraw.h"
@@ -18,7 +19,8 @@
 
 SkPictureRecorder::SkPictureRecorder() {
     fActivelyRecording = false;
-    fRecorder.reset(new SkRecorder(nullptr, SkRect::MakeEmpty(), &fMiniRecorder));
+    fMiniRecorder.reset(new SkMiniRecorder);
+    fRecorder.reset(new SkRecorder(nullptr, SkRect::MakeEmpty(), fMiniRecorder.get()));
 }
 
 SkPictureRecorder::~SkPictureRecorder() {}
@@ -42,7 +44,7 @@ SkCanvas* SkPictureRecorder::beginRecording(const SkRect& userCullRect,
     SkRecorder::DrawPictureMode dpm = (recordFlags & kPlaybackDrawPicture_RecordFlag)
         ? SkRecorder::Playback_DrawPictureMode
         : SkRecorder::Record_DrawPictureMode;
-    fRecorder->reset(fRecord.get(), cullRect, dpm, &fMiniRecorder);
+    fRecorder->reset(fRecord.get(), cullRect, dpm, fMiniRecorder.get());
     fActivelyRecording = true;
     return this->getRecordingCanvas();
 }
@@ -56,7 +58,7 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag
     fRecorder->restoreToCount(1);  // If we were missing any restores, add them now.
 
     if (fRecord->count() == 0) {
-        auto pic = fMiniRecorder.detachAsPicture(fBBH ? nullptr : &fCullRect);
+        auto pic = fMiniRecorder->detachAsPicture(fBBH ? nullptr : &fCullRect);
         fBBH.reset(nullptr);
         return pic;
     }
index d79b434..3d82534 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "SkData.h"
+#include "SkCanvas.h"
 #include "SkGraphics.h"
 #include "SkImageGenerator.h"
 #include "Test.h"
index 81f1d76..bf3dea6 100644 (file)
@@ -12,6 +12,7 @@
 #if SK_SUPPORT_GPU
 #include "GrContext.h"
 #endif
+#include "SkCanvas.h"
 #include "SkColorSpace_Base.h"
 #include "SkImage.h"
 #include "SkSurface.h"
index db4262c..20dccc6 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "Test.h"
 
+#include "../include/core/SkBitmap.h"
 #include "../include/core/SkCanvas.h"
 #include "../include/core/SkPicture.h"
 #include "../include/core/SkStream.h"