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 /samplecode | |
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 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 4 | ||||
-rw-r--r-- | samplecode/SampleApp.h | 2 | ||||
-rw-r--r-- | samplecode/SampleCircle.cpp | 2 | ||||
-rw-r--r-- | samplecode/SampleTextureDomain.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 53c28e4d74..b3632f840f 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -269,7 +269,7 @@ public: SampleWindow* win) { #if SK_SUPPORT_GPU if (IsGpuDeviceType(dType) && NULL != fCurContext) { - SkAutoTUnref<SkDevice> device(new SkGpuDevice(fCurContext, fCurRenderTarget)); + SkAutoTUnref<SkBaseDevice> device(new SkGpuDevice(fCurContext, fCurRenderTarget)); return new SkCanvas(device); } else #endif @@ -1429,7 +1429,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) { if (fRequestGrabImage) { fRequestGrabImage = false; - SkDevice* device = orig->getDevice(); + SkBaseDevice* device = orig->getDevice(); SkBitmap bmp; if (device->accessBitmap(false).copyTo(&bmp, SkBitmap::kARGB_8888_Config)) { static int gSampleGrabCounter; diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h index 61e6c5d526..9328f15570 100644 --- a/samplecode/SampleApp.h +++ b/samplecode/SampleApp.h @@ -61,7 +61,7 @@ public: /** * SampleApp ports can subclass this manager class if they want to: * * filter the types of devices supported - * * customize plugging of SkDevice objects into an SkCanvas + * * customize plugging of SkBaseDevice objects into an SkCanvas * * customize publishing the results of draw to the OS window * * manage GrContext / GrRenderTarget lifetimes */ diff --git a/samplecode/SampleCircle.cpp b/samplecode/SampleCircle.cpp index f65ba01abc..87ca4872e1 100644 --- a/samplecode/SampleCircle.cpp +++ b/samplecode/SampleCircle.cpp @@ -74,7 +74,7 @@ protected: } static void blowup(SkCanvas* canvas, const SkIRect& src, const SkRect& dst) { - SkDevice* device = canvas->getDevice(); + SkBaseDevice* device = canvas->getDevice(); const SkBitmap& bm = device->accessBitmap(false); canvas->drawBitmapRect(bm, &src, dst, NULL); } diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp index de84c35ea4..5928f3c942 100644 --- a/samplecode/SampleTextureDomain.cpp +++ b/samplecode/SampleTextureDomain.cpp @@ -61,7 +61,7 @@ protected: // the constrainted texture domain. // Note: GPU-backed bitmaps follow a different rendering path // when copying from one GPU device to another. - SkAutoTUnref<SkDevice> secondDevice(canvas->createCompatibleDevice( + SkAutoTUnref<SkBaseDevice> secondDevice(canvas->createCompatibleDevice( SkBitmap::kARGB_8888_Config, 5, 5, true)); SkCanvas secondCanvas(secondDevice.get()); |