Reorganize BRD code in new tools directory
authormsarett <msarett@google.com>
Tue, 10 Nov 2015 23:49:46 +0000 (15:49 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 10 Nov 2015 23:49:46 +0000 (15:49 -0800)
Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h

Move BRD code to its own directory in tools.  This
allows us to not need to expose the entire tools
directory in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1417393004

13 files changed:
bench/BitmapRegionDecoderBench.cpp
dm/DM.cpp
dm/DMSrcSink.cpp
gyp/bench.gypi
gyp/dm.gypi
gyp/tools.gyp
tools/android/SkBitmapRegionCanvas.cpp [moved from tools/SkBitmapRegionCanvas.cpp with 99% similarity]
tools/android/SkBitmapRegionCanvas.h [moved from tools/SkBitmapRegionCanvas.h with 100% similarity]
tools/android/SkBitmapRegionCodec.cpp [moved from tools/SkBitmapRegionCodec.cpp with 99% similarity]
tools/android/SkBitmapRegionCodec.h [moved from tools/SkBitmapRegionCodec.h with 100% similarity]
tools/android/SkBitmapRegionDecoder.cpp [moved from tools/SkBitmapRegionDecoder.cpp with 100% similarity]
tools/android/SkBitmapRegionDecoder.h [moved from tools/SkBitmapRegionDecoder.h with 100% similarity]
tools/android/SkBitmapRegionDecoderPriv.h [moved from tools/SkCodecTools.h with 94% similarity]

index 4d9dec0..a98dbb0 100644 (file)
@@ -8,7 +8,7 @@
 #include "BitmapRegionDecoderBench.h"
 #include "CodecBenchPriv.h"
 #include "SkBitmap.h"
-#include "SkCodecTools.h"
+#include "SkBitmapRegionDecoderPriv.h"
 #include "SkOSFile.h"
 
 BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* encoded,
index 9bedd4f..2587b0d 100644 (file)
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -12,9 +12,9 @@
 #include "OverwriteLine.h"
 #include "ProcStats.h"
 #include "SkBBHFactory.h"
+#include "SkBitmapRegionDecoderPriv.h"
 #include "SkChecksum.h"
 #include "SkCodec.h"
-#include "SkCodecTools.h"
 #include "SkCommonFlags.h"
 #include "SkFontMgr.h"
 #include "SkForceLinking.h"
index fb546dc..3581247 100644 (file)
@@ -8,8 +8,8 @@
 #include "DMSrcSink.h"
 #include "SamplePipeControllers.h"
 #include "SkAndroidCodec.h"
+#include "SkBitmapRegionDecoderPriv.h"
 #include "SkCodec.h"
-#include "SkCodecTools.h"
 #include "SkCommonFlags.h"
 #include "SkData.h"
 #include "SkDocument.h"
index 95073b0..075fae8 100644 (file)
@@ -11,7 +11,6 @@
     '../src/effects',
     '../src/gpu',
     '../src/utils',
-    '../tools',
   ],
   'sources': [ '<!@(python find.py ../bench "*.cpp")' ],
 
index 8896673..933fa9a 100644 (file)
@@ -16,7 +16,6 @@
     '../src/utils',
     '../src/utils/debugger',
     '../tests',
-    '../tools',
   ],
   'dependencies': [
     'etc1.gyp:libetc1',
index 31672be..59b19dc 100644 (file)
@@ -51,9 +51,9 @@
       'target_name': 'bitmap_region_decoder',
       'type': 'static_library',
       'sources': [
-        '../tools/SkBitmapRegionCanvas.cpp',
-        '../tools/SkBitmapRegionCodec.cpp',
-        '../tools/SkBitmapRegionDecoder.cpp',
+        '../tools/android/SkBitmapRegionCanvas.cpp',
+        '../tools/android/SkBitmapRegionCodec.cpp',
+        '../tools/android/SkBitmapRegionDecoder.cpp',
       ],
       'include_dirs': [
         '../include/private',
@@ -64,7 +64,7 @@
       ],
       'direct_dependent_settings': {
         'include_dirs': [
-          '../tools',
+          '../tools/android',
         ],
       },
     },
similarity index 99%
rename from tools/SkBitmapRegionCanvas.cpp
rename to tools/android/SkBitmapRegionCanvas.cpp
index 9129245..ffcab95 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #include "SkBitmapRegionCanvas.h"
+#include "SkBitmapRegionDecoderPriv.h"
 #include "SkCanvas.h"
 #include "SkCodecPriv.h"
-#include "SkCodecTools.h"
 
 SkBitmapRegionCanvas::SkBitmapRegionCanvas(SkCodec* decoder)
     : INHERITED(decoder->getInfo().width(), decoder->getInfo().height())
similarity index 99%
rename from tools/SkBitmapRegionCodec.cpp
rename to tools/android/SkBitmapRegionCodec.cpp
index 0af7b62..93ece4a 100644 (file)
@@ -5,10 +5,10 @@
  * found in the LICENSE file.
  */
 
-#include "SkBitmapRegionCodec.h"
 #include "SkAndroidCodec.h"
+#include "SkBitmapRegionCodec.h"
+#include "SkBitmapRegionDecoderPriv.h"
 #include "SkCodecPriv.h"
-#include "SkCodecTools.h"
 #include "SkPixelRef.h"
 
 SkBitmapRegionCodec::SkBitmapRegionCodec(SkAndroidCodec* codec)
similarity index 94%
rename from tools/SkCodecTools.h
rename to tools/android/SkBitmapRegionDecoderPriv.h
index 285d3a2..d7423b0 100644 (file)
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef SkCodecTools_DEFINED
-#define SkCodecTools_DEFINED
+#ifndef SkBitmapRegionDecoderPriv_DEFINED
+#define SkBitmapRegionDecoderPriv_DEFINED
 
 inline float get_scale_from_sample_size(uint32_t sampleSize) {
     return 1.0f / (float) sampleSize;
@@ -60,4 +60,4 @@ inline SubsetType adjust_subset_rect(const SkISize& imageDims, SkIRect* subset,
     return SubsetType::kFullyInside_SubsetType;
 }
 
-#endif // SkCodecTools_DEFINED
+#endif // SkBitmapRegionDecoderPriv_DEFINED