| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index d34170cba110160aa42446bbfaa9d319c965923b..93224d3e403340f2cba7f8cdd59dc9d082e236bc 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -149,13 +149,11 @@ SkGpuDevice* SkGpuDevice::Create(GrSurface* surface, unsigned flags) {
|
| }
|
| }
|
|
|
| -SkGpuDevice::SkGpuDevice(GrContext* context, GrTexture* texture, unsigned flags)
|
| - : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) {
|
| +SkGpuDevice::SkGpuDevice(GrContext* context, GrTexture* texture, unsigned flags) {
|
| this->initFromRenderTarget(context, texture->asRenderTarget(), flags);
|
| }
|
|
|
| -SkGpuDevice::SkGpuDevice(GrContext* context, GrRenderTarget* renderTarget, unsigned flags)
|
| - : SkBitmapDevice(make_bitmap(context, renderTarget)) {
|
| +SkGpuDevice::SkGpuDevice(GrContext* context, GrRenderTarget* renderTarget, unsigned flags) {
|
| this->initFromRenderTarget(context, renderTarget, flags);
|
| }
|
|
|
| @@ -185,8 +183,8 @@ void SkGpuDevice::initFromRenderTarget(GrContext* context,
|
|
|
| SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef,
|
| (surface->info(), surface, SkToBool(flags & kCached_Flag)));
|
| -
|
| - this->setPixelRef(pr)->unref();
|
| + fLegacyBitmap.setInfo(surface->info());
|
| + fLegacyBitmap.setPixelRef(pr)->unref();
|
|
|
| bool useDFFonts = !!(flags & kDFFonts_Flag);
|
| fMainTextContext = fContext->createTextContext(fRenderTarget, fLeakyProperties, useDFFonts);
|
| @@ -290,14 +288,14 @@ bool SkGpuDevice::onWritePixels(const SkImageInfo& info, const void* pixels, siz
|
| fRenderTarget->writePixels(x, y, info.width(), info.height(), config, pixels, rowBytes, flags);
|
|
|
| // need to bump our genID for compatibility with clients that "know" we have a bitmap
|
| - this->onAccessBitmap().notifyPixelsChanged();
|
| + fLegacyBitmap.notifyPixelsChanged();
|
|
|
| return true;
|
| }
|
|
|
| const SkBitmap& SkGpuDevice::onAccessBitmap() {
|
| DO_DEFERRED_CLEAR();
|
| - return INHERITED::onAccessBitmap();
|
| + return fLegacyBitmap;
|
| }
|
|
|
| void SkGpuDevice::onAttachToCanvas(SkCanvas* canvas) {
|
|
|