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

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

Issue 789033002: Remove SkCanvas::drawBitmapMatrix() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: non-const canvas ptr Created 6 years 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
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 this->isFullFrame(&dst, paint) && 822 this->isFullFrame(&dst, paint) &&
823 isPaintOpaque(paint, &bitmap)) { 823 isPaintOpaque(paint, &bitmap)) {
824 this->getDeferredDevice()->skipPendingCommands(); 824 this->getDeferredDevice()->skipPendingCommands();
825 } 825 }
826 826
827 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint); 827 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
828 this->drawingCanvas()->drawBitmapRectToRect(bitmap, src, dst, paint, flags); 828 this->drawingCanvas()->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
829 this->recordedDrawCommand(); 829 this->recordedDrawCommand();
830 } 830 }
831 831
832
833 void SkDeferredCanvas::drawBitmapMatrix(const SkBitmap& bitmap,
834 const SkMatrix& m,
835 const SkPaint* paint) {
836 // TODO: reset recording canvas if paint+bitmap is opaque and clip rect
837 // covers canvas entirely and transformed bitmap covers canvas entirely
838 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
839 this->drawingCanvas()->drawBitmapMatrix(bitmap, m, paint);
840 this->recordedDrawCommand();
841 }
842
843 void SkDeferredCanvas::drawBitmapNine(const SkBitmap& bitmap, 832 void SkDeferredCanvas::drawBitmapNine(const SkBitmap& bitmap,
844 const SkIRect& center, const SkRect& dst, 833 const SkIRect& center, const SkRect& dst,
845 const SkPaint* paint) { 834 const SkPaint* paint) {
846 // TODO: reset recording canvas if paint+bitmap is opaque and clip rect 835 // TODO: reset recording canvas if paint+bitmap is opaque and clip rect
847 // covers canvas entirely and dst covers canvas entirely 836 // covers canvas entirely and dst covers canvas entirely
848 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint); 837 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
849 this->drawingCanvas()->drawBitmapNine(bitmap, center, dst, paint); 838 this->drawingCanvas()->drawBitmapNine(bitmap, center, dst, paint);
850 this->recordedDrawCommand(); 839 this->recordedDrawCommand();
851 } 840 }
852 841
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { 921 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
933 this->drawingCanvas()->setDrawFilter(filter); 922 this->drawingCanvas()->setDrawFilter(filter);
934 this->INHERITED::setDrawFilter(filter); 923 this->INHERITED::setDrawFilter(filter);
935 this->recordedDrawCommand(); 924 this->recordedDrawCommand();
936 return filter; 925 return filter;
937 } 926 }
938 927
939 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { 928 SkCanvas* SkDeferredCanvas::canvasForDrawIter() {
940 return this->drawingCanvas(); 929 return this->drawingCanvas();
941 } 930 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698