diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 20:03:30 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 20:03:30 +0000 |
commit | 33b9ea5000243683c968955b4c5f9391301d3bdb (patch) | |
tree | b76760bbdccc37da6496426e04211c0f2dd023f4 /printing | |
parent | 2564b5df1c07c233e172964be7966029d9d45c3d (diff) | |
download | chromium_src-33b9ea5000243683c968955b4c5f9391301d3bdb.zip chromium_src-33b9ea5000243683c968955b4c5f9391301d3bdb.tar.gz chromium_src-33b9ea5000243683c968955b4c5f9391301d3bdb.tar.bz2 |
roll skia
Review URL: http://codereview.chromium.org/6771051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/native_metafile_skia_wrapper.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/printing/native_metafile_skia_wrapper.cc b/printing/native_metafile_skia_wrapper.cc index af6f446..38de9df 100644 --- a/printing/native_metafile_skia_wrapper.cc +++ b/printing/native_metafile_skia_wrapper.cc @@ -6,7 +6,7 @@ #include "printing/native_metafile_skia_wrapper.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkDevice.h" -#include "third_party/skia/include/core/SkRefDict.h" +#include "third_party/skia/include/core/SkMetaData.h" namespace printing { @@ -14,12 +14,12 @@ namespace { static const char* kNativeMetafileKey = "CrNativeMetafile"; -SkRefDict& getRefDict(SkCanvas* canvas) { +SkMetaData& getMetaData(SkCanvas* canvas) { DCHECK(canvas != NULL); SkDevice* device = canvas->getDevice(); DCHECK(device != NULL); - return device->getRefDict(); + return device->getMetaData(); } } // namespace @@ -32,17 +32,17 @@ void NativeMetafileSkiaWrapper::SetMetafileOnCanvas(SkCanvas* canvas, if (metafile) wrapper = new NativeMetafileSkiaWrapper(metafile); - SkRefDict& dict = getRefDict(canvas); - dict.set(kNativeMetafileKey, wrapper); + SkMetaData& meta = getMetaData(canvas); + meta.setRefCnt(kNativeMetafileKey, wrapper); SkSafeUnref(wrapper); } // static NativeMetafile* NativeMetafileSkiaWrapper::GetMetafileFromCanvas( SkCanvas* canvas) { - SkRefDict& dict = getRefDict(canvas); - SkRefCnt* value = dict.find(kNativeMetafileKey); - if (!value) + SkMetaData& meta = getMetaData(canvas); + SkRefCnt* value; + if (!meta.findRefCnt(kNativeMetafileKey, &value) || !value) return NULL; return static_cast<NativeMetafileSkiaWrapper*>(value)->metafile_; |