diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-25 23:50:57 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-25 23:50:57 +0000 |
commit | 3636ed558fb2af5a48a9634efec55fd8a87c88d7 (patch) | |
tree | c071bddf09196e6adc25b5cd5eaa89d44ba6ba88 /include/core | |
parent | 0e190d0e126991cfba4bc7415c1911761d7be87b (diff) |
embed a refdict inside SkDevice
udate unittests to test refdict's destructor
git-svn-id: http://skia.googlecode.com/svn/trunk@731 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkDevice.h | 10 | ||||
-rw-r--r-- | include/core/SkRefDict.h | 16 |
2 files changed, 24 insertions, 2 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index ec620334a6..b9a96d9aae 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -21,6 +21,7 @@ #include "SkBitmap.h" #include "SkCanvas.h" #include "SkColor.h" +#include "SkRefDict.h" class SkDevice; class SkDraw; @@ -184,6 +185,10 @@ public: virtual void drawDevice(const SkDraw&, SkDevice*, int x, int y, const SkPaint&); + /////////////////////////////////////////////////////////////////////////// + + SkRefDict& getRefDict() { return fRefDict; } + protected: /** Update as needed the pixel value in the bitmap, so that the caller can access the pixels directly. Note: only the pixels field should be altered. The config/width/height/rowbytes @@ -199,8 +204,9 @@ protected: } private: - SkCanvas* fCanvas; - SkBitmap fBitmap; + SkCanvas* fCanvas; + SkBitmap fBitmap; + SkRefDict fRefDict; }; #endif diff --git a/include/core/SkRefDict.h b/include/core/SkRefDict.h index c66f808b5d..3ee27d91b0 100644 --- a/include/core/SkRefDict.h +++ b/include/core/SkRefDict.h @@ -1,3 +1,19 @@ +/* + Copyright 2011 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + #ifndef SkRefDict_DEFINED #define SkRefDict_DEFINED |