| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkDeferredCanvas.h" | 9 #include "SkDeferredCanvas.h" |
| 10 | 10 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 bool hasPendingCommands(); | 150 bool hasPendingCommands(); |
| 151 size_t storageAllocatedForRecording() const; | 151 size_t storageAllocatedForRecording() const; |
| 152 size_t freeMemoryIfPossible(size_t bytesToFree); | 152 size_t freeMemoryIfPossible(size_t bytesToFree); |
| 153 size_t getBitmapSizeThreshold() const; | 153 size_t getBitmapSizeThreshold() const; |
| 154 void setBitmapSizeThreshold(size_t sizeThreshold); | 154 void setBitmapSizeThreshold(size_t sizeThreshold); |
| 155 void flushPendingCommands(PlaybackMode); | 155 void flushPendingCommands(PlaybackMode); |
| 156 void skipPendingCommands(); | 156 void skipPendingCommands(); |
| 157 void setMaxRecordingStorage(size_t); | 157 void setMaxRecordingStorage(size_t); |
| 158 void recordedDrawCommand(); | 158 void recordedDrawCommand(); |
| 159 | 159 |
| 160 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE; | |
| 161 virtual int width() const SK_OVERRIDE; | 160 virtual int width() const SK_OVERRIDE; |
| 162 virtual int height() const SK_OVERRIDE; | 161 virtual int height() const SK_OVERRIDE; |
| 163 virtual SkBitmap::Config config() const SK_OVERRIDE; | 162 virtual SkBitmap::Config config() const SK_OVERRIDE; |
| 164 virtual bool isOpaque() const SK_OVERRIDE; | 163 virtual bool isOpaque() const SK_OVERRIDE; |
| 165 virtual SkImageInfo imageInfo() const SK_OVERRIDE; | 164 virtual SkImageInfo imageInfo() const SK_OVERRIDE; |
| 166 | 165 |
| 167 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 166 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
| 168 | 167 |
| 169 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; | 168 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; |
| 170 | 169 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 424 |
| 426 SkCanvas* SkDeferredDevice::recordingCanvas() { | 425 SkCanvas* SkDeferredDevice::recordingCanvas() { |
| 427 return fRecordingCanvas; | 426 return fRecordingCanvas; |
| 428 } | 427 } |
| 429 | 428 |
| 430 SkImage* SkDeferredDevice::newImageSnapshot() { | 429 SkImage* SkDeferredDevice::newImageSnapshot() { |
| 431 this->flush(); | 430 this->flush(); |
| 432 return fSurface ? fSurface->newImageSnapshot() : NULL; | 431 return fSurface ? fSurface->newImageSnapshot() : NULL; |
| 433 } | 432 } |
| 434 | 433 |
| 435 uint32_t SkDeferredDevice::getDeviceCapabilities() { | |
| 436 return immediateDevice()->getDeviceCapabilities(); | |
| 437 } | |
| 438 | |
| 439 int SkDeferredDevice::width() const { | 434 int SkDeferredDevice::width() const { |
| 440 return immediateDevice()->width(); | 435 return immediateDevice()->width(); |
| 441 } | 436 } |
| 442 | 437 |
| 443 int SkDeferredDevice::height() const { | 438 int SkDeferredDevice::height() const { |
| 444 return immediateDevice()->height(); | 439 return immediateDevice()->height(); |
| 445 } | 440 } |
| 446 | 441 |
| 447 SkBitmap::Config SkDeferredDevice::config() const { | 442 SkBitmap::Config SkDeferredDevice::config() const { |
| 448 return immediateDevice()->config(); | 443 return immediateDevice()->config(); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 1027 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
| 1033 this->drawingCanvas()->setDrawFilter(filter); | 1028 this->drawingCanvas()->setDrawFilter(filter); |
| 1034 this->INHERITED::setDrawFilter(filter); | 1029 this->INHERITED::setDrawFilter(filter); |
| 1035 this->recordedDrawCommand(); | 1030 this->recordedDrawCommand(); |
| 1036 return filter; | 1031 return filter; |
| 1037 } | 1032 } |
| 1038 | 1033 |
| 1039 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 1034 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
| 1040 return this->drawingCanvas(); | 1035 return this->drawingCanvas(); |
| 1041 } | 1036 } |
| OLD | NEW |