diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-20 17:49:04 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-20 17:49:04 +0000 |
commit | 3055b700189afdd02486ed8f2279cea1d8897243 (patch) | |
tree | a66e6ce6e9717464dd67eb206f76440da9bab059 /src/gpu | |
parent | 4eaa6647e70c9404d1c920f674d706ca2d2a76b9 (diff) |
Split SkDevice out of SkBitmapDevice
https://codereview.chromium.org/22978012/
git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index d96ffb84a3..4a89ef3106 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -161,12 +161,12 @@ SkGpuDevice* SkGpuDevice::Create(GrSurface* surface) { } SkGpuDevice::SkGpuDevice(GrContext* context, GrTexture* texture) -: SkDevice(make_bitmap(context, texture->asRenderTarget())) { + : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { this->initFromRenderTarget(context, texture->asRenderTarget(), false); } SkGpuDevice::SkGpuDevice(GrContext* context, GrRenderTarget* renderTarget) -: SkDevice(make_bitmap(context, renderTarget)) { + : SkBitmapDevice(make_bitmap(context, renderTarget)) { this->initFromRenderTarget(context, renderTarget, false); } @@ -203,7 +203,7 @@ SkGpuDevice::SkGpuDevice(GrContext* context, int width, int height, int sampleCount) - : SkDevice(config, width, height, false /*isOpaque*/) { + : SkBitmapDevice(config, width, height, false /*isOpaque*/) { fDrawProcs = NULL; @@ -1436,7 +1436,7 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, fContext->drawRectToRect(grPaint, dstRect, paintRect, &m); } -static bool filter_texture(SkDevice* device, GrContext* context, +static bool filter_texture(SkBaseDevice* device, GrContext* context, GrTexture* texture, SkImageFilter* filter, int w, int h, const SkMatrix& ctm, SkBitmap* result, SkIPoint* offset) { @@ -1535,7 +1535,7 @@ void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, this->drawBitmapCommon(draw, bitmap, &tmpSrc, matrix, paint, flags); } -void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device, +void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, int x, int y, const SkPaint& paint) { // clear of the source device must occur before CHECK_SHOULD_DRAW SkGpuDevice* dev = static_cast<SkGpuDevice*>(device); @@ -1818,10 +1818,10 @@ void SkGpuDevice::flush() { /////////////////////////////////////////////////////////////////////////////// -SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config, - int width, int height, - bool isOpaque, - Usage usage) { +SkBaseDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config, + int width, int height, + bool isOpaque, + Usage usage) { GrTextureDesc desc; desc.fConfig = fRenderTarget->config(); desc.fFlags = kRenderTarget_GrTextureFlagBit; @@ -1854,7 +1854,7 @@ SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config, SkGpuDevice::SkGpuDevice(GrContext* context, GrTexture* texture, bool needClear) - : SkDevice(make_bitmap(context, texture->asRenderTarget())) { + : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { SkASSERT(texture && texture->asRenderTarget()); // This constructor is called from onCreateCompatibleDevice. It has locked the RT in the texture |