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

Side by Side Diff: Source/platform/graphics/InterceptingCanvas.cpp

Issue 1183863005: Paint Profiler: unroll SkPictures (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "platform/graphics/InterceptingCanvas.h"
7
8 namespace blink {
9
10 void InterceptingCanvasBase::unrollDrawPicture(const SkPicture* picture, const S kMatrix* matrix, const SkPaint* paint, SkPicture::AbortCallback* abortCallback)
11 {
12 int saveCount = this->getSaveCount();
13 if (paint) {
14 SkRect newBounds = picture->cullRect();
f(malita) 2015/06/17 18:20:56 Nit: the 'bounds' saveLayer arg is optional, so I
caseq 2015/06/17 18:29:47 Would it be the same performance-wise? I was think
f(malita) 2015/06/17 18:41:56 It defaults to using the current clip bounds, but
15 if (matrix)
16 matrix->mapRect(&newBounds);
17 this->saveLayer(&newBounds, paint);
18 } else if (matrix) {
19 this->save();
20 }
21 if (matrix)
22 this->concat(*matrix);
23
24 picture->playback(this, abortCallback);
25
26 this->restoreToCount(saveCount);
27 }
28
29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698