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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 2127233002: Added the framework for having canvas/recorder/picture record depth_set's. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 void SkCanvas::setMatrix(const SkMatrix& matrix) { 1514 void SkCanvas::setMatrix(const SkMatrix& matrix) {
1515 this->checkForDeferredSave(); 1515 this->checkForDeferredSave();
1516 this->internalSetMatrix(matrix); 1516 this->internalSetMatrix(matrix);
1517 this->didSetMatrix(matrix); 1517 this->didSetMatrix(matrix);
1518 } 1518 }
1519 1519
1520 void SkCanvas::resetMatrix() { 1520 void SkCanvas::resetMatrix() {
1521 this->setMatrix(SkMatrix::I()); 1521 this->setMatrix(SkMatrix::I());
1522 } 1522 }
1523 1523
1524 void SkCanvas::setZ(uint32_t z) {
jvanverth1 2016/07/07 18:43:02 This and getZ() could be inlined directly in the S
vjiaoblack 2016/07/07 19:04:10 Done.
1525 this->curDrawDepth = z;
1526 this->didSetZ(z);
1527 }
1528
1529 uint32_t SkCanvas::getZ() const {
1530 return this->curDrawDepth;
1531 }
1532
1524 ////////////////////////////////////////////////////////////////////////////// 1533 //////////////////////////////////////////////////////////////////////////////
1525 1534
1526 void SkCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) { 1535 void SkCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
1527 if (!fAllowSoftClip) { 1536 if (!fAllowSoftClip) {
1528 doAA = false; 1537 doAA = false;
1529 } 1538 }
1530 1539
1531 #ifdef SK_SUPPORT_PRECHECK_CLIPRECT 1540 #ifdef SK_SUPPORT_PRECHECK_CLIPRECT
1532 // Check if we can quick-accept the clip call (and do nothing) 1541 // Check if we can quick-accept the clip call (and do nothing)
1533 // 1542 //
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
3094 3103
3095 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 3104 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
3096 fCanvas->restoreToCount(fSaveCount); 3105 fCanvas->restoreToCount(fSaveCount);
3097 } 3106 }
3098 3107
3099 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API 3108 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API
3100 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) { 3109 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) {
3101 return this->makeSurface(info, props).release(); 3110 return this->makeSurface(info, props).release();
3102 } 3111 }
3103 #endif 3112 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698