| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2012 Google Inc. | 2  * Copyright 2012 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #include "SkBBoxHierarchy.h" | 8 #include "SkBBoxHierarchy.h" | 
| 9 #include "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" | 
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" | 
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1862 | 1862 | 
| 1863 struct CountingBBH : public SkBBoxHierarchy { | 1863 struct CountingBBH : public SkBBoxHierarchy { | 
| 1864     mutable int searchCalls; | 1864     mutable int searchCalls; | 
| 1865 | 1865 | 
| 1866     CountingBBH() : searchCalls(0) {} | 1866     CountingBBH() : searchCalls(0) {} | 
| 1867 | 1867 | 
| 1868     virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const
       SK_OVERRIDE { | 1868     virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const
       SK_OVERRIDE { | 
| 1869         this->searchCalls++; | 1869         this->searchCalls++; | 
| 1870     } | 1870     } | 
| 1871 | 1871 | 
| 1872     virtual void insert(unsigned opIndex, const SkRect& bounds, bool defer) SK_O
      VERRIDE {} | 1872     virtual void insert(SkAutoTMalloc<SkRect>*, int) SK_OVERRIDE {} | 
| 1873 }; | 1873 }; | 
| 1874 | 1874 | 
| 1875 class SpoonFedBBHFactory : public SkBBHFactory { | 1875 class SpoonFedBBHFactory : public SkBBHFactory { | 
| 1876 public: | 1876 public: | 
| 1877     explicit SpoonFedBBHFactory(SkBBoxHierarchy* bbh) : fBBH(bbh) {} | 1877     explicit SpoonFedBBHFactory(SkBBoxHierarchy* bbh) : fBBH(bbh) {} | 
| 1878     virtual SkBBoxHierarchy* operator()(int width, int height) const { | 1878     virtual SkBBoxHierarchy* operator()(int width, int height) const { | 
| 1879         return SkRef(fBBH); | 1879         return SkRef(fBBH); | 
| 1880     } | 1880     } | 
| 1881 private: | 1881 private: | 
| 1882     SkBBoxHierarchy* fBBH; | 1882     SkBBoxHierarchy* fBBH; | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1920 | 1920 | 
| 1921     // The picture shares the immutable pixels but copies the mutable ones. | 1921     // The picture shares the immutable pixels but copies the mutable ones. | 
| 1922     REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1922     REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 
| 1923     REPORTER_ASSERT(r, !immut.pixelRef()->unique()); | 1923     REPORTER_ASSERT(r, !immut.pixelRef()->unique()); | 
| 1924 | 1924 | 
| 1925     // When the picture goes away, it's just our bitmaps holding the refs. | 1925     // When the picture goes away, it's just our bitmaps holding the refs. | 
| 1926     pic.reset(NULL); | 1926     pic.reset(NULL); | 
| 1927     REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1927     REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 
| 1928     REPORTER_ASSERT(r, immut.pixelRef()->unique()); | 1928     REPORTER_ASSERT(r, immut.pixelRef()->unique()); | 
| 1929 } | 1929 } | 
| OLD | NEW | 
|---|