| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrPictureUtils.h" | 8 #include "GrPictureUtils.h" |
| 9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(fInfo.fSize.fWidth, fInfo.
fSize.fHeight)); | 44 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(fInfo.fSize.fWidth, fInfo.
fSize.fHeight)); |
| 45 fAccelData = accelData; | 45 fAccelData = accelData; |
| 46 fAlreadyDrawn = false; | 46 fAlreadyDrawn = false; |
| 47 } | 47 } |
| 48 | 48 |
| 49 virtual ~GrGatherDevice() { } | 49 virtual ~GrGatherDevice() { } |
| 50 | 50 |
| 51 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); } | 51 virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); } |
| 52 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); } | 52 virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); } |
| 53 virtual bool isOpaque() const SK_OVERRIDE { return false; } | 53 virtual bool isOpaque() const SK_OVERRIDE { return false; } |
| 54 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG |
| 54 virtual SkBitmap::Config config() const SK_OVERRIDE { | 55 virtual SkBitmap::Config config() const SK_OVERRIDE { |
| 55 return SkBitmap::kNo_Config; | 56 return SkBitmap::kNo_Config; |
| 56 } | 57 } |
| 58 #endif |
| 57 virtual SkImageInfo imageInfo() const SK_OVERRIDE { | 59 virtual SkImageInfo imageInfo() const SK_OVERRIDE { |
| 58 return fEmptyBitmap.info(); | 60 return fEmptyBitmap.info(); |
| 59 } | 61 } |
| 60 | 62 |
| 61 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG | 63 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG |
| 62 virtual void writePixels(const SkBitmap& bitmap, int x, int y, | 64 virtual void writePixels(const SkBitmap& bitmap, int x, int y, |
| 63 SkCanvas::Config8888 config8888) SK_OVERRIDE { | 65 SkCanvas::Config8888 config8888) SK_OVERRIDE { |
| 64 NotSupported(); | 66 NotSupported(); |
| 65 } | 67 } |
| 66 #endif | 68 #endif |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) { | 277 void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) { |
| 276 if (0 == pict->width() || 0 == pict->height()) { | 278 if (0 == pict->width() || 0 == pict->height()) { |
| 277 return ; | 279 return ; |
| 278 } | 280 } |
| 279 | 281 |
| 280 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0); | 282 GrGatherDevice device(pict->width(), pict->height(), pict, accelData, 0); |
| 281 GrGatherCanvas canvas(&device, pict); | 283 GrGatherCanvas canvas(&device, pict); |
| 282 | 284 |
| 283 canvas.gather(); | 285 canvas.gather(); |
| 284 } | 286 } |
| OLD | NEW |