Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: src/utils/SkDeferredCanvas.cpp

Issue 17269003: Change undefined SkGpuRenderTarget and SkGpuTexture forward declares to GrRenderTarget and GrTextur… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 size_t getBitmapSizeThreshold() const; 156 size_t getBitmapSizeThreshold() const;
157 void setBitmapSizeThreshold(size_t sizeThreshold); 157 void setBitmapSizeThreshold(size_t sizeThreshold);
158 void flushPendingCommands(PlaybackMode); 158 void flushPendingCommands(PlaybackMode);
159 void skipPendingCommands(); 159 void skipPendingCommands();
160 void setMaxRecordingStorage(size_t); 160 void setMaxRecordingStorage(size_t);
161 void recordedDrawCommand(); 161 void recordedDrawCommand();
162 162
163 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE; 163 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE;
164 virtual int width() const SK_OVERRIDE; 164 virtual int width() const SK_OVERRIDE;
165 virtual int height() const SK_OVERRIDE; 165 virtual int height() const SK_OVERRIDE;
166 virtual SkGpuRenderTarget* accessRenderTarget() SK_OVERRIDE; 166 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
167 167
168 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config, 168 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
169 int width, int height, 169 int width, int height,
170 bool isOpaque, 170 bool isOpaque,
171 Usage usage) SK_OVERRIDE; 171 Usage usage) SK_OVERRIDE;
172 172
173 virtual void writePixels(const SkBitmap& bitmap, int x, int y, 173 virtual void writePixels(const SkBitmap& bitmap, int x, int y,
174 SkCanvas::Config8888 config8888) SK_OVERRIDE; 174 SkCanvas::Config8888 config8888) SK_OVERRIDE;
175 175
176 protected: 176 protected:
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 int DeferredDevice::width() const { 430 int DeferredDevice::width() const {
431 return immediateDevice()->width(); 431 return immediateDevice()->width();
432 } 432 }
433 433
434 int DeferredDevice::height() const { 434 int DeferredDevice::height() const {
435 return immediateDevice()->height(); 435 return immediateDevice()->height();
436 } 436 }
437 437
438 SkGpuRenderTarget* DeferredDevice::accessRenderTarget() { 438 GrRenderTarget* DeferredDevice::accessRenderTarget() {
439 this->flushPendingCommands(kNormal_PlaybackMode); 439 this->flushPendingCommands(kNormal_PlaybackMode);
440 return immediateDevice()->accessRenderTarget(); 440 return immediateDevice()->accessRenderTarget();
441 } 441 }
442 442
443 void DeferredDevice::writePixels(const SkBitmap& bitmap, 443 void DeferredDevice::writePixels(const SkBitmap& bitmap,
444 int x, int y, SkCanvas::Config8888 config8888) { 444 int x, int y, SkCanvas::Config8888 config8888) {
445 445
446 if (x <= 0 && y <= 0 && (x + bitmap.width()) >= width() && 446 if (x <= 0 && y <= 0 && (x + bitmap.width()) >= width() &&
447 (y + bitmap.height()) >= height()) { 447 (y + bitmap.height()) >= height()) {
448 this->skipPendingCommands(); 448 this->skipPendingCommands();
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { 1006 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
1007 this->drawingCanvas()->setDrawFilter(filter); 1007 this->drawingCanvas()->setDrawFilter(filter);
1008 this->INHERITED::setDrawFilter(filter); 1008 this->INHERITED::setDrawFilter(filter);
1009 this->recordedDrawCommand(); 1009 this->recordedDrawCommand();
1010 return filter; 1010 return filter;
1011 } 1011 }
1012 1012
1013 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { 1013 SkCanvas* SkDeferredCanvas::canvasForDrawIter() {
1014 return this->drawingCanvas(); 1014 return this->drawingCanvas();
1015 } 1015 }
OLDNEW
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698