summaryrefslogtreecommitdiffstats
path: root/cc/resources/scoped_ui_resource.cc
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 18:02:59 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 18:02:59 +0000
commit1152878dbe41fcfea67d49144170b65695f5c0e1 (patch)
tree9bc16be8b52421b5d8db91b72d0aebd9b7106aa0 /cc/resources/scoped_ui_resource.cc
parent4a7dbbe9e9d675dbf3ab47878d16cce23c26e8da (diff)
downloadchromium_src-1152878dbe41fcfea67d49144170b65695f5c0e1.zip
chromium_src-1152878dbe41fcfea67d49144170b65695f5c0e1.tar.gz
chromium_src-1152878dbe41fcfea67d49144170b65695f5c0e1.tar.bz2
Revert 222732 "Update the nine patch layer to use UI resources"
> Update the nine patch layer to use UI resources > > The old nine-patch layer used priority resource manager for requesting textures. > This patch updates the nine-patch layer to use the UI resource manager. > this patch clarifies the semantics of the aperture in both image and layer > The new semantics corresponds to existing logic on the android-side. > > Changes have been made to UIResourceBitmap to use SkPixelRef as ref-counted > of the bitmap content. > > The android-side changes: > https://gerrit-int.chromium.org/#/c/43103/ > > BUG=276482,276487 > > Review URL: https://chromiumcodereview.appspot.com/22870016 TBR=powei@chromium.org Review URL: https://codereview.chromium.org/23620047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/scoped_ui_resource.cc')
-rw-r--r--cc/resources/scoped_ui_resource.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/cc/resources/scoped_ui_resource.cc b/cc/resources/scoped_ui_resource.cc
index e69b4bc..0136a8e 100644
--- a/cc/resources/scoped_ui_resource.cc
+++ b/cc/resources/scoped_ui_resource.cc
@@ -12,12 +12,12 @@ namespace cc {
scoped_ptr<ScopedUIResource> ScopedUIResource::Create(
LayerTreeHost* host,
- const UIResourceBitmap& bitmap) {
+ scoped_refptr<UIResourceBitmap> bitmap) {
return make_scoped_ptr(new ScopedUIResource(host, bitmap));
}
ScopedUIResource::ScopedUIResource(LayerTreeHost* host,
- const UIResourceBitmap& bitmap)
+ scoped_refptr<UIResourceBitmap> bitmap)
: bitmap_(bitmap), host_(host) {
DCHECK(host_);
id_ = host_->CreateUIResource(this);
@@ -32,9 +32,16 @@ ScopedUIResource::~ScopedUIResource() {
}
}
-UIResourceBitmap ScopedUIResource::GetBitmap(UIResourceId uid,
- bool resource_lost) {
+gfx::Size ScopedUIResource::GetSize() const {
+ return bitmap_->GetSize();
+}
+
+scoped_refptr<UIResourceBitmap> ScopedUIResource::GetBitmap(
+ UIResourceId uid,
+ bool resource_lost) {
return bitmap_;
}
+ScopedUIResource::ScopedUIResource() {}
+
} // namespace cc