diff options
author | powei@chromium.org <powei@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 06:28:57 +0000 |
---|---|---|
committer | powei@chromium.org <powei@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 06:28:57 +0000 |
commit | c928076e7b0f787091d512d6e24e4cbeb90159bb (patch) | |
tree | d7b38b3e0dc6b28e30418f6228ecba5d116a8577 /cc/test/fake_scoped_ui_resource.h | |
parent | a8a515cf0845fcfdea7163fe1ed78a8c4c2b2e5b (diff) | |
download | chromium_src-c928076e7b0f787091d512d6e24e4cbeb90159bb.zip chromium_src-c928076e7b0f787091d512d6e24e4cbeb90159bb.tar.gz chromium_src-c928076e7b0f787091d512d6e24e4cbeb90159bb.tar.bz2 |
Proposed UI Resource Manager. See internal doc:
https://docs.google.com/a/google.com/document/d/1Im8fR0bVsBHC2I1f2MuzW-e-h1H1F5GYH4fbdBTsbQ8/edit
BUG=259095,173947
Review URL: https://chromiumcodereview.appspot.com/18191020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_scoped_ui_resource.h')
-rw-r--r-- | cc/test/fake_scoped_ui_resource.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cc/test/fake_scoped_ui_resource.h b/cc/test/fake_scoped_ui_resource.h new file mode 100644 index 0000000..84c097f --- /dev/null +++ b/cc/test/fake_scoped_ui_resource.h @@ -0,0 +1,33 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_TEST_FAKE_SCOPED_UI_RESOURCE_H_ +#define CC_TEST_FAKE_SCOPED_UI_RESOURCE_H_ + +#include "base/memory/ref_counted.h" +#include "cc/resources/scoped_ui_resource.h" + +namespace cc { + +class LayerTreeHost; + +class FakeScopedUIResource : public ScopedUIResource { + public: + static scoped_ptr<FakeScopedUIResource> Create(LayerTreeHost* host); + + virtual scoped_refptr<UIResourceBitmap> GetBitmap( + UIResourceId uid, + bool resource_lost) OVERRIDE; + void ResetCounters(); + + int resource_create_count; + int lost_resource_count; + + private: + explicit FakeScopedUIResource(LayerTreeHost* host); +}; + +} // namespace cc + +#endif // CC_TEST_FAKE_SCOPED_UI_RESOURCE_H_ |