29 size_t nSize = strlen(needle);
30 for (
size_t i = 0;
i < dataSize - nSize;
i++) {
31 if (strncmp(&
data[
i], needle, nSize) == 0) {
57 SkCanvas* canvas = doc->beginPage(612.0f, 792.0f);
67 const char* rawOutput = (
const char*)
out->data();
76 SkCanvas* canvas = doc->beginPage(612.0f, 792.0f);
85 const char* rawOutput = (
const char*)
out->data();
105 const char* rawOutput = (
const char*)
out->data();
108 ContainsString(rawOutput,
out->size(),
"a xlink:href=\"http://www.gooogle.com\""));
122 const char* rawOutput = (
const char*)
out->data();
126 "a xlink:href=\"http://www.gooogle.com/#NamedDestination\""));
static bool ContainsString(const char *data, size_t dataSize, const char *needle)
DEF_TEST(Annotation_NoDraw, reporter)
SK_API void SkAnnotateRectWithURL(SkCanvas *, const SkRect &, SkData *)
SK_API void SkAnnotateNamedDestination(SkCanvas *, const SkPoint &, SkData *)
SK_API void SkAnnotateLinkToDestination(SkCanvas *, const SkRect &, SkData *)
constexpr SkColor SK_ColorTRANSPARENT
#define REPORTER_ASSERT(r, cond,...)
#define REQUIRE_PDF_DOCUMENT(TEST_NAME, REPORTER)
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void eraseColor(SkColor4f) const
static sk_sp< SkData > MakeWithCString(const char cstr[])
sk_sp< SkData > detachAsData()
static std::unique_ptr< SkCanvas > Make(const SkRect &bounds, SkWStream *, uint32_t flags=0)
SK_API sk_sp< SkDocument > MakeDocument(SkWStream *stream, const Metadata &metadata)
Optional< SkRect > bounds
static constexpr SkPoint Make(float x, float y)
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)
std::shared_ptr< const fml::Mapping > data