summaryrefslogtreecommitdiffstats
path: root/ui/gfx/image
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-03 00:18:13 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-03 00:18:13 +0000
commitd33c744151eacb1959b3c7cb86e127d34e03045b (patch)
tree7701df36587aafbd7dd3253b941bdae853869069 /ui/gfx/image
parent39790b7f875b20555b97b403975293ea5af5bf79 (diff)
downloadchromium_src-d33c744151eacb1959b3c7cb86e127d34e03045b.zip
chromium_src-d33c744151eacb1959b3c7cb86e127d34e03045b.tar.gz
chromium_src-d33c744151eacb1959b3c7cb86e127d34e03045b.tar.bz2
Update ui/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/16291003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/image')
-rw-r--r--ui/gfx/image/image_skia.cc16
-rw-r--r--ui/gfx/image/image_skia.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc
index 8f1379d..1ae9874 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -304,23 +304,23 @@ const ImageSkiaRep& ImageSkia::GetRepresentation(
}
void ImageSkia::SetReadOnly() {
- CHECK(storage_);
+ CHECK(storage_.get());
storage_->SetReadOnly();
DetachStorageFromThread();
}
void ImageSkia::MakeThreadSafe() {
- CHECK(storage_);
+ CHECK(storage_.get());
EnsureRepsForSupportedScaleFactors();
// Delete source as we no longer needs it.
- if (storage_)
+ if (storage_.get())
storage_->DeleteSource();
storage_->SetReadOnly();
CHECK(IsThreadSafe());
}
bool ImageSkia::IsThreadSafe() const {
- return !storage_ || (storage_->read_only() && !storage_->has_source());
+ return !storage_.get() || (storage_->read_only() && !storage_->has_source());
}
int ImageSkia::width() const {
@@ -358,7 +358,7 @@ void ImageSkia::EnsureRepsForSupportedScaleFactors() const {
// Don't check ReadOnly because the source may generate images
// even for read only ImageSkia. Concurrent access will be protected
// by |DCHECK(CalledOnValidThread())| in FindRepresentation.
- if (storage_ && storage_->has_source()) {
+ if (storage_.get() && storage_->has_source()) {
std::vector<ui::ScaleFactor> supported_scale_factors =
ui::GetSupportedScaleFactors();
for (size_t i = 0; i < supported_scale_factors.size(); ++i)
@@ -398,15 +398,15 @@ SkBitmap& ImageSkia::GetBitmap() const {
}
bool ImageSkia::CanRead() const {
- return !storage_ || storage_->CanRead();
+ return !storage_.get() || storage_->CanRead();
}
bool ImageSkia::CanModify() const {
- return !storage_ || storage_->CanModify();
+ return !storage_.get() || storage_->CanModify();
}
void ImageSkia::DetachStorageFromThread() {
- if (storage_)
+ if (storage_.get())
storage_->DetachFromThread();
}
diff --git a/ui/gfx/image/image_skia.h b/ui/gfx/image/image_skia.h
index 0aa2bf9..9d0e9afa 100644
--- a/ui/gfx/image/image_skia.h
+++ b/ui/gfx/image/image_skia.h
@@ -114,7 +114,7 @@ class UI_EXPORT ImageSkia {
bool IsThreadSafe() const;
// Returns true if this is a null object.
- bool isNull() const { return storage_ == NULL; }
+ bool isNull() const { return storage_.get() == NULL; }
// Width and height of image in DIP coordinate system.
int width() const;