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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int width() const SK_OVERRIDE; | 160 virtual int width() const SK_OVERRIDE; |
161 virtual int height() const SK_OVERRIDE; | 161 virtual int height() const SK_OVERRIDE; |
| 162 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG |
162 virtual SkBitmap::Config config() const SK_OVERRIDE; | 163 virtual SkBitmap::Config config() const SK_OVERRIDE; |
| 164 #endif |
163 virtual bool isOpaque() const SK_OVERRIDE; | 165 virtual bool isOpaque() const SK_OVERRIDE; |
164 virtual SkImageInfo imageInfo() const SK_OVERRIDE; | 166 virtual SkImageInfo imageInfo() const SK_OVERRIDE; |
165 | 167 |
166 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 168 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
167 | 169 |
168 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; | 170 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; |
169 | 171 |
170 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 172 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
171 | 173 |
172 protected: | 174 protected: |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 } | 430 } |
429 | 431 |
430 int SkDeferredDevice::width() const { | 432 int SkDeferredDevice::width() const { |
431 return immediateDevice()->width(); | 433 return immediateDevice()->width(); |
432 } | 434 } |
433 | 435 |
434 int SkDeferredDevice::height() const { | 436 int SkDeferredDevice::height() const { |
435 return immediateDevice()->height(); | 437 return immediateDevice()->height(); |
436 } | 438 } |
437 | 439 |
| 440 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG |
438 SkBitmap::Config SkDeferredDevice::config() const { | 441 SkBitmap::Config SkDeferredDevice::config() const { |
439 return immediateDevice()->config(); | 442 return immediateDevice()->config(); |
440 } | 443 } |
| 444 #endif |
441 | 445 |
442 bool SkDeferredDevice::isOpaque() const { | 446 bool SkDeferredDevice::isOpaque() const { |
443 return immediateDevice()->isOpaque(); | 447 return immediateDevice()->isOpaque(); |
444 } | 448 } |
445 | 449 |
446 SkImageInfo SkDeferredDevice::imageInfo() const { | 450 SkImageInfo SkDeferredDevice::imageInfo() const { |
447 return immediateDevice()->imageInfo(); | 451 return immediateDevice()->imageInfo(); |
448 } | 452 } |
449 | 453 |
450 GrRenderTarget* SkDeferredDevice::accessRenderTarget() { | 454 GrRenderTarget* SkDeferredDevice::accessRenderTarget() { |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 963 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
960 this->drawingCanvas()->setDrawFilter(filter); | 964 this->drawingCanvas()->setDrawFilter(filter); |
961 this->INHERITED::setDrawFilter(filter); | 965 this->INHERITED::setDrawFilter(filter); |
962 this->recordedDrawCommand(); | 966 this->recordedDrawCommand(); |
963 return filter; | 967 return filter; |
964 } | 968 } |
965 | 969 |
966 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 970 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
967 return this->drawingCanvas(); | 971 return this->drawingCanvas(); |
968 } | 972 } |
OLD | NEW |