aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 14:58:06 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 14:58:06 +0000
commita22e2117e44efa4298dd0eb6df304a8166c8e9c3 (patch)
tree727738c19786a7c5caf1e09ccfe431b652d8b302 /samplecode
parent1f47f4f7325971dd53991e2bb02da94fa7c6d962 (diff)
Extended Inst counting to find "unknown" leaked object (SkTMaskGamma)
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp2
-rw-r--r--samplecode/SampleApp.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index e237ac598f..254d209db1 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -38,6 +38,8 @@ class GrContext;
#include "SkGPipe.h"
#include "SamplePipeControllers.h"
+SK_DEFINE_INST_COUNT(SampleWindow::DeviceManager)
+
extern SampleView* CreateSamplePictFileView(const char filename[]);
class PictFileFactory : public SkViewFactory {
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index 00353b208a..cb4446f18e 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -54,6 +54,8 @@ public:
*/
class DeviceManager : public SkRefCnt {
public:
+ SK_DECLARE_INST_COUNT(DeviceManager)
+
virtual void setUpBackend(SampleWindow* win, int msaaSampleCount) = 0;
virtual void tearDownBackend(SampleWindow* win) = 0;
@@ -79,6 +81,8 @@ public:
// return the GrRenderTarget backing gpu devices (NULL if not built with GPU support)
virtual GrRenderTarget* getGrRenderTarget() = 0;
+ private:
+ typedef SkRefCnt INHERITED;
};
SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*);