michael@0: /* michael@0: * Copyright 2013 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: /** michael@0: * This function's sole purpose is to trick the linker into not discarding michael@0: * SkImageDecoder subclasses just because we do not directly call them. michael@0: * This is necessary in applications that will create image decoders from michael@0: * a stream. michael@0: * Call this function with an expression that evaluates to false to ensure michael@0: * that the linker includes the subclasses. michael@0: * Passing true will result in leaked objects. michael@0: */ michael@0: int SkForceLinking(bool doNotPassTrue); michael@0: michael@0: #define __SK_FORCE_IMAGE_DECODER_LINKING \ michael@0: static int linking_forced = SkForceLinking(false)