diff options
author | Ben Murdoch <benm@google.com> | 2011-05-13 16:40:46 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-16 11:35:03 +0100 |
commit | a2c606d1d8312a5d063e4a11e5911d9c8e4a3d19 (patch) | |
tree | 614d69ba96a23bc057e539a3c8a7d4961a68254b /Source/WebKit/android/RenderSkinNinePatch.h | |
parent | 65f03d4f644ce73618e5f4f50dd694b26f55ae12 (diff) | |
download | external_webkit-a2c606d1d8312a5d063e4a11e5911d9c8e4a3d19.zip external_webkit-a2c606d1d8312a5d063e4a11e5911d9c8e4a3d19.tar.gz external_webkit-a2c606d1d8312a5d063e4a11e5911d9c8e4a3d19.tar.bz2 |
Merge WebKit at r75993: Move WebKit/android files to Source
Change-Id: Ifa871f8320bdb3a09fe189fffecc23f702c394b9
Diffstat (limited to 'Source/WebKit/android/RenderSkinNinePatch.h')
-rw-r--r-- | Source/WebKit/android/RenderSkinNinePatch.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Source/WebKit/android/RenderSkinNinePatch.h b/Source/WebKit/android/RenderSkinNinePatch.h new file mode 100644 index 0000000..e4db260 --- /dev/null +++ b/Source/WebKit/android/RenderSkinNinePatch.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * 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 RenderSkinNinePatch_h +#define RenderSkinNinePatch_h + +#include "SkBitmap.h" +#include "utils/Asset.h" + +namespace android { + class AssetManager; +} + +class SkCanvas; +class SkRect; + +struct NinePatch { + SkBitmap m_bitmap; + void* m_serializedPatchData; + NinePatch() { + m_serializedPatchData = 0; + } + ~NinePatch() { + if (m_serializedPatchData) + free(m_serializedPatchData); + } +}; + +class RenderSkinNinePatch { +public: + static bool decodeAsset(android::AssetManager*, const char* fileName, NinePatch*); + static void DrawNinePatch(SkCanvas*, const SkRect&, const NinePatch&); +}; + +#endif // RenderSkinNinePatch_h |