aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-03-11 05:18:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-11 05:18:48 -0800
commit3dd9ed37c24611af86f0fe374bd3698b63f09450 (patch)
treeaeb9a4e0ddffe9cdd7029b413b7578544dfc1913 /src/gpu
parent2f56b1aba22ad79a5e63587e4bca3001ab7ab0ba (diff)
Use std::unique_ptr.
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrLayerAtlas.cpp6
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrLayerAtlas.cpp b/src/gpu/GrLayerAtlas.cpp
index df8215a607..c1f8732b35 100644
--- a/src/gpu/GrLayerAtlas.cpp
+++ b/src/gpu/GrLayerAtlas.cpp
@@ -12,7 +12,7 @@
#include "GrTextureProvider.h"
///////////////////////////////////////////////////////////////////////////////
-GrLayerAtlas::Plot::Plot()
+GrLayerAtlas::Plot::Plot()
: fID(-1)
, fRects(nullptr) {
fOffset.set(0, 0);
@@ -54,7 +54,7 @@ bool GrLayerAtlas::reattachBackingTexture() {
SkASSERT(!fTexture);
fTexture.reset(fTexProvider->findAndRefTextureByUniqueKey(get_layer_atlas_key()));
- return SkToBool(fTexture);
+ return fTexture != nullptr;
}
void GrLayerAtlas::createBackingTexture() {
@@ -71,7 +71,7 @@ void GrLayerAtlas::createBackingTexture() {
fTexture->resourcePriv().setUniqueKey(get_layer_atlas_key());
}
-GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
+GrLayerAtlas::GrLayerAtlas(GrTextureProvider* texProvider, GrPixelConfig config,
GrSurfaceFlags flags,
const SkISize& backingTextureSize,
int numPlotsX, int numPlotsY) {
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index ab9025d316..661f22512d 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -329,7 +329,7 @@ class GrStencilAndCoverTextContext::FallbackBlobBuilder {
public:
FallbackBlobBuilder() : fBuffIdx(0), fCount(0) {}
- bool isInitialized() const { return SkToBool(fBuilder); }
+ bool isInitialized() const { return fBuilder != nullptr; }
void init(const SkPaint& font, SkScalar textRatio);