Fix includes of SkRRect and other Skia headers

I would like to (re-)land https://skia-review.googlesource.com/c/skia/+/512158
which tidies up includes around SkRRect. I searched for all
places in libs/hwui that used SkRRect and made sure they either
forward declared it or included it, as appropriate.

While going through these files, I fixed a few other includes that
stood out to me, e.g. SkPaint, SkCanvas, etc to make sure the files
that use the symbols are the ones including them (and lessening
transitive dependencies).

Change-Id: I44792a6b9f06a54d052cefa4cbc9342f46ab2a4f
This commit is contained in:
Kevin Lubick
2022-02-24 16:24:09 +00:00
parent 8edab3cc26
commit 856848e4de
17 changed files with 55 additions and 5 deletions

View File

@@ -29,10 +29,14 @@
#include "SkDrawShadowInfo.h"
#include "SkImage.h"
#include "SkImageFilter.h"
#include "SkImageInfo.h"
#include "SkLatticeIter.h"
#include "SkMath.h"
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkRRect.h"
#include "SkRSXform.h"
#include "SkRect.h"
#include "SkRegion.h"
#include "SkTextBlob.h"
#include "SkVertices.h"

View File

@@ -34,6 +34,8 @@
#include <SkRuntimeEffect.h>
#include <vector>
class SkRRect;
namespace android {
namespace uirenderer {

View File

@@ -27,6 +27,7 @@
#include <SkAndroidFrameworkUtils.h>
#include <SkAnimatedImage.h>
#include <SkBitmap.h>
#include <SkCanvasPriv.h>
#include <SkCanvasStateUtils.h>
#include <SkColorFilter.h>
@@ -36,8 +37,13 @@
#include <SkGraphics.h>
#include <SkImage.h>
#include <SkImagePriv.h>
#include <SkMatrix.h>
#include <SkPaint.h>
#include <SkPicture.h>
#include <SkRSXform.h>
#include <SkRRect.h>
#include <SkRect.h>
#include <SkRefCnt.h>
#include <SkShader.h>
#include <SkTemplates.h>
#include <SkTextBlob.h>

View File

@@ -33,6 +33,8 @@
#include <cassert>
#include <optional>
class SkRRect;
namespace android {
// Holds an SkCanvas reference plus additional native data.

View File

@@ -17,13 +17,19 @@
#pragma once
#include <SkAndroidFrameworkUtils.h>
#include <SkBlendMode.h>
#include <SkCanvas.h>
#include <SkPath.h>
#include <SkRegion.h>
#include <SkVertices.h>
#include <SkClipOp.h>
#include <SkImage.h>
#include <SkPaint.h>
#include <SkPath.h>
#include <SkPicture.h>
#include <SkRRect.h>
#include <SkRect.h>
#include <SkRegion.h>
#include <SkRuntimeEffect.h>
#include <SkSamplingOptions.h>
#include <SkVertices.h>
#include <log/log.h>

View File

@@ -26,6 +26,7 @@
#include "hwui/PaintFilter.h"
#include <SkFontMetrics.h>
#include <SkRRect.h>
namespace android {

View File

@@ -31,6 +31,7 @@
class SkAnimatedImage;
class SkCanvasState;
class SkRRect;
class SkRuntimeShaderBuilder;
class SkVertices;

View File

@@ -19,6 +19,8 @@
#include "RenderNode.h"
#include "SkiaDisplayList.h"
class SkRRect;
namespace android {
namespace uirenderer {
namespace skiapipeline {

View File

@@ -17,7 +17,6 @@
#pragma once
#include <string>
#include "SkRRect.h"
namespace android {
namespace uirenderer {

View File

@@ -15,7 +15,11 @@
*/
#include "RenderNodeDrawable.h"
#include <SkPaint.h>
#include <SkPaintFilterCanvas.h>
#include <SkPoint.h>
#include <SkRRect.h>
#include <SkRect.h>
#include <gui/TraceUtils.h>
#include "RenderNode.h"
#include "SkiaDisplayList.h"

View File

@@ -16,7 +16,11 @@
#include "SkiaRecordingCanvas.h"
#include "hwui/Paint.h"
#include <SkImage.h>
#include <SkImagePriv.h>
#include <SkPaint.h>
#include <SkRRect.h>
#include <SkRect.h>
#include "CanvasTransform.h"
#ifdef __ANDROID__ // Layoutlib does not support Layers
#include "Layer.h"

View File

@@ -22,6 +22,11 @@
#include "SkiaDisplayList.h"
#include "pipeline/skia/AnimatedDrawables.h"
class SkBitmap;
class SkMatrix;
class SkPaint;
class SkRRect;
namespace android {
namespace uirenderer {
namespace skiapipeline {

View File

@@ -19,6 +19,8 @@
#include "HolePunch.h"
#include "SkData.h"
#include "SkDrawable.h"
#include "SkPaint.h"
#include "SkRRect.h"
using namespace android::uirenderer::skiapipeline;

View File

@@ -15,6 +15,7 @@
*/
#include <SkFont.h>
#include <SkRRect.h>
#include <cstdio>
#include "TestSceneBase.h"
#include "hwui/Paint.h"

View File

@@ -23,9 +23,17 @@
#include <tests/common/CallCountingCanvas.h>
#include "SkPictureRecorder.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkImageInfo.h"
#include "SkLatticeIter.h"
#include "SkPaint.h"
#include "SkPath.h"
#include "SkPictureRecorder.h"
#include "SkRRect.h"
#include "SkRect.h"
#include "SkRegion.h"
#include "pipeline/skia/AnimatedDrawables.h"
#include <SkNoDrawCanvas.h>

View File

@@ -19,6 +19,8 @@
#include <SkCanvas.h>
#include <gtest/gtest.h>
class SkRRect;
namespace {
class TestCanvasBase : public SkCanvas {

View File

@@ -17,6 +17,7 @@
#include <VectorDrawable.h>
#include <gtest/gtest.h>
#include <SkCanvas.h>
#include <SkClipStack.h>
#include <SkSurface_Base.h>
#include <string.h>