Skip to content

Commit

Permalink
header self-sufficiency and idempotency
Browse files Browse the repository at this point in the history
Change-Id: I4ec74a358e11d85c6eaf1658efd6f1391ee5e387
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223930
Commit-Queue: Hal Canary <[email protected]>
Commit-Queue: Ben Wagner <[email protected]>
Auto-Submit: Hal Canary <[email protected]>
Reviewed-by: Ben Wagner <[email protected]>
  • Loading branch information
HalCanary authored and Skia Commit-Bot committed Jun 26, 2019
1 parent 793818b commit 02eefbe
Show file tree
Hide file tree
Showing 25 changed files with 94 additions and 109 deletions.
2 changes: 2 additions & 0 deletions src/codec/SkFrameHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "include/codec/SkCodecAnimation.h"
#include "include/core/SkRect.h"
#include "include/core/SkTypes.h"
#include "include/private/SkEncodedInfo.h"
#include "include/private/SkNoncopyable.h"
#include "src/codec/SkCodecAnimationPriv.h"

/**
Expand Down
3 changes: 3 additions & 0 deletions src/codec/SkScalingCodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkScalingCodec_DEFINED
#define SkScalingCodec_DEFINED

#include "include/codec/SkCodec.h"

Expand Down Expand Up @@ -34,3 +36,4 @@ class SkScalingCodec : public SkCodec {
typedef SkCodec INHERITED;
};

#endif // SkScalingCodec_DEFINED
2 changes: 2 additions & 0 deletions src/core/SkMSAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "include/core/SkTypes.h"

#include <string.h>

// Typically declared in LLVM's msan_interface.h. Easier for us to just re-declare.
extern "C" {
void __msan_check_mem_is_initialized(const volatile void*, size_t);
Expand Down
4 changes: 4 additions & 0 deletions src/core/SkSafeRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef SkSafeRange_DEFINED
#define SkSafeRange_DEFINED

#include "include/core/SkTypes.h"

#include <cstdint>

// SkSafeRange always check that a series of operations are in-range.
// This check is sticky, so that if any one operation fails, the object will remember that and
// return false from ok().
Expand Down
1 change: 1 addition & 0 deletions src/core/SkSpecialSurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

class GrBackendFormat;
class GrContext;
class GrRecordingContext;
class SkBitmap;
class SkCanvas;
class SkSpecialImage;
Expand Down
5 changes: 3 additions & 2 deletions src/core/SkStrikeInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#ifndef SkStrikeInterface_DEFINED
#define SkStrikeInterface_DEFINED

#include <memory>

#include "include/core/SkPaint.h"
#include "include/core/SkPoint.h"
#include "include/core/SkTypes.h"
#include "src/core/SkSpan.h"

#include <memory>

class SkDescriptor;
class SkGlyph;
class SkMaskFilter;
Expand Down
1 change: 1 addition & 0 deletions src/core/SkWritePixelsRec.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SkWritePixelsRec_DEFINED

#include "include/core/SkImageInfo.h"
#include "include/core/SkPixmap.h"

/**
* Helper class to package and trim the parameters passed to writePixels()
Expand Down
2 changes: 2 additions & 0 deletions src/gpu/GrContextThreadSafeProxyPriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "include/gpu/GrContextThreadSafeProxy.h"

#include "src/gpu/GrCaps.h"

/**
* Class that adds methods to GrContextThreadSafeProxy that are only intended for use internal to
* Skia. This class is purely a privileged window into GrContextThreadSafeProxy. It should never
Expand Down
1 change: 1 addition & 0 deletions src/gpu/geometry/GrRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifndef GrRect_DEFINED
#define GrRect_DEFINED

#include "include/core/SkMatrix.h"
#include "include/core/SkRect.h"
#include "include/core/SkTypes.h"
#include "include/private/SkTo.h"
Expand Down
1 change: 1 addition & 0 deletions src/gpu/mock/GrMockTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "include/gpu/GrTexture.h"
#include "include/gpu/mock/GrMockTypes.h"
#include "src/gpu/GrRenderTargetPriv.h"
#include "src/gpu/GrStencilAttachment.h"
#include "src/gpu/GrTexturePriv.h"
#include "src/gpu/mock/GrMockGpu.h"

Expand Down
1 change: 1 addition & 0 deletions src/image/SkReadPixelsRec.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SkReadPixelsRec_DEFINED

#include "include/core/SkImageInfo.h"
#include "include/core/SkPixmap.h"

/**
* Helper class to package and trim the parameters passed to readPixels()
Expand Down
1 change: 1 addition & 0 deletions src/image/SkSurface_Gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#if SK_SUPPORT_GPU

class GrBackendFormat;
class SkGpuDevice;

class SkSurface_Gpu : public SkSurface_Base {
Expand Down
2 changes: 2 additions & 0 deletions src/opts/SkVM_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "src/core/SkVM.h"

#include "include/private/SkVx.h"

namespace SK_OPTS_NS {

inline void eval(const skvm::Program::Instruction insts[], const int ninsts,
Expand Down
1 change: 1 addition & 0 deletions src/pdf/SkPDFTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "src/core/SkArenaAlloc.h"

class SkPDFDocument;
struct SkPDFIndirectReference;
struct SkPDFTagNode;

class SkPDFTagTree {
Expand Down
1 change: 1 addition & 0 deletions src/sksl/SkSLCPP.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <cmath>
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"

using std::abs;

Expand Down
6 changes: 6 additions & 0 deletions src/sksl/ir/SkSLEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@
#ifndef SKSL_ENUM
#define SKSL_ENUM

#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLProgramElement.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLVariable.h"

#include <algorithm>
#include <vector>

namespace SkSL {

struct Symbol;

struct Enum : public ProgramElement {
Enum(int offset, StringFragment typeName, std::shared_ptr<SymbolTable> symbols)
: INHERITED(offset, kEnum_Kind)
Expand Down
1 change: 1 addition & 0 deletions src/sksl/ir/SkSLPostfixExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifndef SKSL_POSTFIXEXPRESSION
#define SKSL_POSTFIXEXPRESSION

#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/ir/SkSLExpression.h"

Expand Down
2 changes: 2 additions & 0 deletions src/sksl/ir/SkSLProgramElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "src/sksl/ir/SkSLIRNode.h"

#include <memory>

namespace SkSL {

/**
Expand Down
2 changes: 2 additions & 0 deletions src/sksl/ir/SkSLSwitchStatement.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

namespace SkSL {

class SymbolTable;

/**
* A 'switch' statement.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/sksl/lex/DFAState.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#include "src/sksl/lex/LexUtil.h"

#include <vector>
#include <string>

struct DFAState {
struct Label {
std::vector<int> fStates;
Expand Down
3 changes: 3 additions & 0 deletions src/sksl/lex/NFAtoDFA.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef NFAtoDFA_DEFINED
#define NFAtoDFA_DEFINED

#include "src/sksl/lex/DFA.h"
#include "src/sksl/lex/DFAState.h"
Expand Down Expand Up @@ -163,3 +165,4 @@ class NFAtoDFA {
std::vector<int> fCharMappings;
std::vector<int> fAccepts;
};
#endif // NFAtoDFA_DEFINED
1 change: 1 addition & 0 deletions src/utils/SkCallableTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SkCallableTraits_DEFINED

#include <type_traits>
#include <tuple>

template <typename R, typename... Args> struct sk_base_callable_traits {
using return_type = R;
Expand Down
Loading

0 comments on commit 02eefbe

Please sign in to comment.