diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 09:40:26 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 09:40:26 +0000 |
commit | 584abe77f84b1bf56e9633e63d4fe60947eabe27 (patch) | |
tree | 8f362a9a98484c54f67968d42705c82f16328b0c /cc/cc_tests.gyp | |
parent | 5a260744b81b9d3be148c2ac2b9387ab2f015213 (diff) | |
download | chromium_src-584abe77f84b1bf56e9633e63d4fe60947eabe27.zip chromium_src-584abe77f84b1bf56e9633e63d4fe60947eabe27.tar.gz chromium_src-584abe77f84b1bf56e9633e63d4fe60947eabe27.tar.bz2 |
Only use skia::RefPtr for refcounting
For consistency and sanity in Chromium, only use skia::RefPtr in Chromium to
ref count skia classes. SkRefPtr is unsafe to use for newly created objects
because it refs the object that is passed to its constructor. skia::RefPtr
makes this adoption explicit it via skia::AdoptRef and so is much clearer.
This patch also adds a skia::ShareRef function which makes it explicit that the
callsite is adopting a ref which is already owned somewhere else. Using
AdoptRef vs. ShareRef seems much clearer than using SkRefPtr vs. skia::RefPtr.
These are the remaining code sites that use internal Skia reference counted
classes. Once these have been removed, then we can use a PRESUBMIT rule to
prevent new uses from being added.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/15004024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/cc_tests.gyp')
-rw-r--r-- | cc/cc_tests.gyp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp index 7936688b..dc3d267 100644 --- a/cc/cc_tests.gyp +++ b/cc/cc_tests.gyp @@ -160,6 +160,8 @@ 'test/render_pass_test_utils.h', 'test/scheduler_test_common.cc', 'test/scheduler_test_common.h', + 'test/skia_common.cc', + 'test/skia_common.h', 'test/test_web_graphics_context_3d.cc', 'test/test_web_graphics_context_3d.h', 'test/tiled_layer_test_common.cc', |