aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 18:43:21 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 18:43:21 +0000
commit2f68e7684bb2ecdf0c03a513c31d0626d2caf752 (patch)
treede5b359fa82d5e3abf26a640a5c11ba7fa4807fb /src/gpu/SkGpuDevice.cpp
parenta8a977a97babddacd406f09b8106ff9f0ef18993 (diff)
Move texture domains onto a GrCustomStage, off of GrSamplerState.
This will require gyp changes to roll into Chrome. http://codereview.appspot.com/6405050/ git-svn-id: http://skia.googlecode.com/svn/trunk@4641 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index dfded26c65..d0d46041c1 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -8,6 +8,7 @@
#include "SkGpuDevice.h"
#include "effects/GrGradientEffects.h"
+#include "effects/GrTextureDomainEffect.h"
#include "GrContext.h"
#include "GrTextContext.h"
@@ -1453,8 +1454,10 @@ void SkGpuDevice::internalDrawBitmap(const SkDraw& draw,
top = bottom = GrScalarHalf(paintRect.top() + paintRect.bottom());
}
textureDomain.setLTRB(left, top, right, bottom);
+ sampler->setCustomStage(SkNEW_ARGS(GrTextureDomainEffect,
+ (texture,
+ textureDomain)))->unref();
}
- sampler->setTextureDomain(textureDomain);
fContext->drawRectToRect(*grPaint, dstRect, paintRect, &m);
}