diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-05 12:08:12 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-05 12:08:12 +0000 |
commit | ab1c13864df34aecfd4840ea7d1e4f8730b44f4e (patch) | |
tree | a625a37bc45bf55d7327b9f55a11d435058f8778 /src/images | |
parent | 000d732ca70391aa7196efdbaf9992a96ff2fc99 (diff) |
Fix compilation with SK_ENABLE_INST_COUNT=1
Add INHERITED declarations to class declarations that prevent
compilation with the flag.
Remove SK_DEFINE_INST_COUNT from all class implementations. Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.
Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.
For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.
Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.
R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/98703002
git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageDecoder.cpp | 4 | ||||
-rw-r--r-- | src/images/SkMovie.cpp | 2 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp index 6bfd4f1a60..5fb3c72b9f 100644 --- a/src/images/SkImageDecoder.cpp +++ b/src/images/SkImageDecoder.cpp @@ -14,10 +14,6 @@ #include "SkTemplates.h" #include "SkCanvas.h" -SK_DEFINE_INST_COUNT(SkImageDecoder::Peeker) -SK_DEFINE_INST_COUNT(SkImageDecoder::Chooser) -SK_DEFINE_INST_COUNT(SkImageDecoderFactory) - static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config; SkBitmap::Config SkImageDecoder::GetDeviceConfig() diff --git a/src/images/SkMovie.cpp b/src/images/SkMovie.cpp index d2439eb6e0..9a2a71cd57 100644 --- a/src/images/SkMovie.cpp +++ b/src/images/SkMovie.cpp @@ -9,8 +9,6 @@ #include "SkCanvas.h" #include "SkPaint.h" -SK_DEFINE_INST_COUNT(SkMovie) - // We should never see this in normal operation since our time values are // 0-based. So we use it as a sentinal. #define UNINITIALIZED_MSEC ((SkMSec)-1) |