From 5b073680ecba631da68e33d0d2f28f10a07110ce Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Tue, 8 Mar 2011 18:33:31 +0000 Subject: [PATCH] Enable compiling the PDF backend by default in the makefile. Use SKIA_PDF_SUPPORT=false to disable the PDF backend. Review URL: http://codereview.appspot.com/4267046 git-svn-id: http://skia.googlecode.com/svn/trunk@906 2bbb7eff-a529-9590-31e7-b0007b416f81 --- Makefile | 19 ++++--------------- src/pdf/SkPDFFont.cpp | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index c3354ff66d..e482060c62 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ endif DEFINES += -DSK_SUPPORT_LCDTEXT -ifeq ($(SKIA_PDF_SUPPORT),true) +ifneq ($(SKIA_PDF_SUPPORT),false) DEFINES += -DSK_SUPPORT_PDF ifneq ($(SKIA_DEBUG),true) DEFINES += -DSK_ZLIB_INCLUDE="" @@ -69,7 +69,7 @@ include src/gpu/skgr_files.mk SRC_LIST += $(addprefix src/gpu/, $(SOURCE)) # pdf backend files -ifeq ($(SKIA_PDF_SUPPORT),true) +ifneq ($(SKIA_PDF_SUPPORT),false) C_INCLUDES += -Iinclude/pdf include src/pdf/pdf_files.mk SRC_LIST += $(addprefix src/pdf/, $(SOURCE)) @@ -176,7 +176,7 @@ bench: $(BENCH_OBJS) out/libskia.a C_INCLUDES += -Isrc/core include tests/tests_files.mk -ifeq ($(SKIA_PDF_SUPPORT),true) +ifneq ($(SKIA_PDF_SUPPORT),false) SOURCE += PDFPrimitivesTest.cpp endif TESTS_SRCS := $(addprefix tests/, $(SOURCE)) @@ -230,17 +230,6 @@ gm: $(GM_OBJS) out/libskia.a @echo "linking gm..." $(HIDE)$(GPP) $(GM_OBJS) out/libskia.a -o out/gm/gm $(LINKER_OPTS) -SAMPLEPDF_SRCS := samplepdf.cpp - -SAMPLEPDF_SRCS := $(addprefix tools/, $(SAMPLEPDF_SRCS)) - -SAMPLEPDF_OBJS := $(SAMPLEPDF_SRCS:.cpp=.o) -SAMPLEPDF_OBJS := $(addprefix out/, $(SAMPLEPDF_OBJS)) - -samplepdf: $(SAMPLEPDF_OBJS) out/libskia.a - @echo "linking samplepdf..." - $(HIDE)$(GPP) $(SAMPLEPDF_OBJS) out/libskia.a -o out/tools/samplepdf $(LINKER_OPTS) - ############################################################################## .PHONY: all @@ -265,5 +254,5 @@ help: @echo " SKIA_DEBUG=true for debug build" @echo " SKIA_SCALAR=fixed for fixed-point build" @echo " SKIA_BUILD_FOR=mac for mac build (e.g. CG for image decoding)" - @echo " SKIA_PDF_SUPPORT=true to enable the pdf generation backend" + @echo " SKIA_PDF_SUPPORT=false to disable the pdf generation backend" @echo "" diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 2cbc243efa..7b952fced0 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -195,7 +195,7 @@ SkStream* handleType1Stream(SkStream* srcStream, size_t* headerLen, const uint8_t* hexData = src + *headerLen; const uint8_t* trailer = hexData + hexDataLen; size_t outputOffset = 0; - uint8_t dataByte; + uint8_t dataByte = 0; // To hush compiler. bool highNibble = true; for (; hexData < trailer; hexData++) { char curNibble = hexToBin(*hexData); -- 2.34.1