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

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

Issue 2357273003: Do not set bounds on SkLiteRecorder
Patch Set: Created 4 years, 3 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
« src/core/SkCanvas.cpp ('K') | « src/core/SkCanvas.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 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 "SkLiteDL.h" 8 #include "SkLiteDL.h"
9 #include "SkLiteRecorder.h" 9 #include "SkLiteRecorder.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
11 11
12 SkLiteRecorder::SkLiteRecorder() 12 SkLiteRecorder::SkLiteRecorder()
13 : SkCanvas({0,0,1,1}, SkCanvas::kConservativeRasterClip_InitFlag) 13 : SkCanvas({0,0,1,1}, SkCanvas::kConservativeRasterClip_InitFlag)
14 , fDL(nullptr) {} 14 , fDL(nullptr) {}
15 15
16 void SkLiteRecorder::reset(SkLiteDL* dl) { 16 void SkLiteRecorder::reset(SkLiteDL* dl) {
17 this->resetForNextPicture(dl->getBounds().roundOut()); 17 this->resetForNextPicture({0,0,1,1});
18 fDL = dl; 18 fDL = dl;
19 } 19 }
20 20
21 sk_sp<SkSurface> SkLiteRecorder::onNewSurface(const SkImageInfo&, const SkSurfac eProps&) { 21 sk_sp<SkSurface> SkLiteRecorder::onNewSurface(const SkImageInfo&, const SkSurfac eProps&) {
22 return nullptr; 22 return nullptr;
23 } 23 }
24 24
25 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER 25 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER
26 SkDrawFilter* SkLiteRecorder::setDrawFilter(SkDrawFilter* df) { 26 SkDrawFilter* SkLiteRecorder::setDrawFilter(SkDrawFilter* df) {
27 fDL->setDrawFilter(df); 27 fDL->setDrawFilter(df);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 void SkLiteRecorder::didTranslateZ(SkScalar dz) { 201 void SkLiteRecorder::didTranslateZ(SkScalar dz) {
202 fDL->translateZ(dz); 202 fDL->translateZ(dz);
203 } 203 }
204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, 204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture,
205 const SkMatrix* matrix, 205 const SkMatrix* matrix,
206 const SkPaint* paint, 206 const SkPaint* paint,
207 const SkShadowParams& params) { 207 const SkShadowParams& params) {
208 fDL->drawShadowedPicture(picture, matrix, paint, params); 208 fDL->drawShadowedPicture(picture, matrix, paint, params);
209 } 209 }
OLDNEW
« src/core/SkCanvas.cpp ('K') | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698