aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-26 19:18:23 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-26 19:18:23 +0000
commitb8d00db075b5ea09e353508a26ef5ced50722a6c (patch)
treee24369ac62bdd014c79c15f960924e4c8bd62780 /src
parent18bbba9a9ae3c9c434ac2159bac0b4296ae7f213 (diff)
Change undefined SkGpuRenderTarget and SkGpuTexture forward declares to GrRenderTarget and GrTexture.
R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/17269003 git-svn-id: http://skia.googlecode.com/svn/trunk@9775 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBitmap.cpp2
-rw-r--r--src/core/SkImageFilter.cpp2
-rw-r--r--src/effects/SkBicubicImageFilter.cpp2
-rw-r--r--src/effects/SkBlendImageFilter.cpp4
-rw-r--r--src/effects/SkBlurImageFilter.cpp2
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp4
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp4
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp4
-rw-r--r--src/gpu/SkGpuDevice.cpp12
-rw-r--r--src/gpu/SkGrPixelRef.cpp4
-rw-r--r--src/image/SkSurface_Gpu.cpp6
-rw-r--r--src/utils/SkDeferredCanvas.cpp4
12 files changed, 25 insertions, 25 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index a0428655f2..f164ca570a 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -424,7 +424,7 @@ void SkBitmap::notifyPixelsChanged() const {
}
}
-SkGpuTexture* SkBitmap::getTexture() const {
+GrTexture* SkBitmap::getTexture() const {
return fPixelRef ? fPixelRef->getTexture() : NULL;
}
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 37d1f44fd4..9f16b4a0c8 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -105,7 +105,7 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBitmap*
if (!SkImageFilterUtils::GetInputResultGPU(this->getInput(0), proxy, src, &input)) {
return false;
}
- GrTexture* srcTexture = (GrTexture*) input.getTexture();
+ GrTexture* srcTexture = input.getTexture();
SkRect rect;
src.getBounds(&rect);
GrContext* context = srcTexture->getContext();
diff --git a/src/effects/SkBicubicImageFilter.cpp b/src/effects/SkBicubicImageFilter.cpp
index daa59484fa..2d0a17a116 100644
--- a/src/effects/SkBicubicImageFilter.cpp
+++ b/src/effects/SkBicubicImageFilter.cpp
@@ -346,7 +346,7 @@ bool SkBicubicImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkB
if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &srcBM)) {
return false;
}
- GrTexture* srcTexture = (GrTexture*) srcBM.getTexture();
+ GrTexture* srcTexture = srcBM.getTexture();
GrContext* context = srcTexture->getContext();
SkRect dstRect = SkRect::MakeWH(srcBM.width() * fScale.fWidth,
diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp
index 330e87d76d..4f61ed8000 100644
--- a/src/effects/SkBlendImageFilter.cpp
+++ b/src/effects/SkBlendImageFilter.cpp
@@ -155,12 +155,12 @@ bool SkBlendImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBit
if (!SkImageFilterUtils::GetInputResultGPU(getBackgroundInput(), proxy, src, &backgroundBM)) {
return false;
}
- GrTexture* background = (GrTexture*) backgroundBM.getTexture();
+ GrTexture* background = backgroundBM.getTexture();
SkBitmap foregroundBM;
if (!SkImageFilterUtils::GetInputResultGPU(getForegroundInput(), proxy, src, &foregroundBM)) {
return false;
}
- GrTexture* foreground = (GrTexture*) foregroundBM.getTexture();
+ GrTexture* foreground = foregroundBM.getTexture();
GrContext* context = foreground->getContext();
GrTextureDesc desc;
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 7b68ea0214..36d0afd35e 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -198,7 +198,7 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBitm
if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &input)) {
return false;
}
- GrTexture* source = (GrTexture*) input.getTexture();
+ GrTexture* source = input.getTexture();
SkRect rect;
src.getBounds(&rect);
SkAutoTUnref<GrTexture> tex(source->getContext()->gaussianBlur(source, false, rect,
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index f81f32fb96..7c99c023f8 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -280,12 +280,12 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
if (!SkImageFilterUtils::GetInputResultGPU(getColorInput(), proxy, src, &colorBM)) {
return false;
}
- GrTexture* color = (GrTexture*) colorBM.getTexture();
+ GrTexture* color = colorBM.getTexture();
SkBitmap displacementBM;
if (!SkImageFilterUtils::GetInputResultGPU(getDisplacementInput(), proxy, src, &displacementBM)) {
return false;
}
- GrTexture* displacement = (GrTexture*) displacementBM.getTexture();
+ GrTexture* displacement = displacementBM.getTexture();
GrContext* context = color->getContext();
GrTextureDesc desc;
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index be63d15b10..cbee8500ac 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -507,7 +507,7 @@ bool SkDilateImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBi
if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &inputBM)) {
return false;
}
- GrTexture* input = (GrTexture*) inputBM.getTexture();
+ GrTexture* input = inputBM.getTexture();
SkIRect bounds;
src.getBounds(&bounds);
SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds,
@@ -520,7 +520,7 @@ bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBit
if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &inputBM)) {
return false;
}
- GrTexture* input = (GrTexture*) inputBM.getTexture();
+ GrTexture* input = inputBM.getTexture();
SkIRect bounds;
src.getBounds(&bounds);
SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds,
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index a7f50c30cd..c26ca18041 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -70,12 +70,12 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, Sk
if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &background)) {
return false;
}
- GrTexture* backgroundTex = (GrTexture*) background.getTexture();
+ GrTexture* backgroundTex = background.getTexture();
SkBitmap foreground;
if (!SkImageFilterUtils::GetInputResultGPU(getInput(1), proxy, src, &foreground)) {
return false;
}
- GrTexture* foregroundTex = (GrTexture*) foreground.getTexture();
+ GrTexture* foregroundTex = foreground.getTexture();
GrContext* context = foregroundTex->getContext();
GrEffectRef* xferEffect = NULL;
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 22f01f92e8..bfc3695f3e 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -449,9 +449,9 @@ void SkGpuDevice::prepareDraw(const SkDraw& draw, bool forceIdentity) {
DO_DEFERRED_CLEAR();
}
-SkGpuRenderTarget* SkGpuDevice::accessRenderTarget() {
+GrRenderTarget* SkGpuDevice::accessRenderTarget() {
DO_DEFERRED_CLEAR();
- return (SkGpuRenderTarget*)fRenderTarget;
+ return fRenderTarget;
}
bool SkGpuDevice::bindDeviceAsTexture(GrPaint* paint) {
@@ -1494,8 +1494,8 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
SkBitmap filterBitmap;
if (filter_texture(this, fContext, texture, filter, w, h, &filterBitmap)) {
grPaint.colorStage(kBitmapEffectIdx)->setEffect(
- GrSimpleTextureEffect::Create((GrTexture*) filterBitmap.getTexture(), SkMatrix::I()))->unref();
- texture = (GrTexture*) filterBitmap.getTexture();
+ GrSimpleTextureEffect::Create(filterBitmap.getTexture(), SkMatrix::I()))->unref();
+ texture = filterBitmap.getTexture();
w = filterBitmap.width();
h = filterBitmap.height();
}
@@ -1571,8 +1571,8 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
SkBitmap filterBitmap;
if (filter_texture(this, fContext, devTex, filter, w, h, &filterBitmap)) {
grPaint.colorStage(kBitmapEffectIdx)->setEffect(
- GrSimpleTextureEffect::Create((GrTexture*) filterBitmap.getTexture(), SkMatrix::I()))->unref();
- devTex = (GrTexture*) filterBitmap.getTexture();
+ GrSimpleTextureEffect::Create(filterBitmap.getTexture(), SkMatrix::I()))->unref();
+ devTex = filterBitmap.getTexture();
w = filterBitmap.width();
h = filterBitmap.height();
}
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
index 8751c5d8bf..98819bfd73 100644
--- a/src/gpu/SkGrPixelRef.cpp
+++ b/src/gpu/SkGrPixelRef.cpp
@@ -128,9 +128,9 @@ SkGrPixelRef::~SkGrPixelRef() {
GrSafeUnref(fSurface);
}
-SkGpuTexture* SkGrPixelRef::getTexture() {
+GrTexture* SkGrPixelRef::getTexture() {
if (NULL != fSurface) {
- return (SkGpuTexture*) fSurface->asTexture();
+ return fSurface->asTexture();
}
return NULL;
}
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 154f1793f0..75c3890eb5 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -66,14 +66,14 @@ SkCanvas* SkSurface_Gpu::onNewCanvas() {
}
SkSurface* SkSurface_Gpu::onNewSurface(const SkImage::Info& info) {
- GrRenderTarget* rt = (GrRenderTarget*) fDevice->accessRenderTarget();
+ GrRenderTarget* rt = fDevice->accessRenderTarget();
int sampleCount = rt->numSamples();
return SkSurface::NewRenderTarget(fDevice->context(), info, sampleCount);
}
SkImage* SkSurface_Gpu::onNewImageSnapshot() {
- GrRenderTarget* rt = (GrRenderTarget*) fDevice->accessRenderTarget();
+ GrRenderTarget* rt = fDevice->accessRenderTarget();
return SkImage::NewTexture(rt->asTexture());
}
@@ -87,7 +87,7 @@ void SkSurface_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
// device into it. Note that this flushes the SkGpuDevice but
// doesn't force an OpenGL flush.
void SkSurface_Gpu::onCopyOnWrite(ContentChangeMode mode) {
- GrRenderTarget* rt = (GrRenderTarget*) fDevice->accessRenderTarget();
+ GrRenderTarget* rt = fDevice->accessRenderTarget();
// are we sharing our render target with the image?
SkASSERT(NULL != this->getCachedImage());
if (rt->asTexture() == SkTextureImageGetTexture(this->getCachedImage())) {
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 89997a1f3f..da3c72e22c 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -163,7 +163,7 @@ public:
virtual uint32_t getDeviceCapabilities() SK_OVERRIDE;
virtual int width() const SK_OVERRIDE;
virtual int height() const SK_OVERRIDE;
- virtual SkGpuRenderTarget* accessRenderTarget() SK_OVERRIDE;
+ virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
int width, int height,
@@ -435,7 +435,7 @@ int DeferredDevice::height() const {
return immediateDevice()->height();
}
-SkGpuRenderTarget* DeferredDevice::accessRenderTarget() {
+GrRenderTarget* DeferredDevice::accessRenderTarget() {
this->flushPendingCommands(kNormal_PlaybackMode);
return immediateDevice()->accessRenderTarget();
}