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

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

Issue 794263002: Cull pushCull and popCull from Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix debugger 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/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SkRecorder.h" 8 #include "SkRecorder.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 void SkRecorder::didRestore() { 289 void SkRecorder::didRestore() {
290 SkBool8 saveLayer; 290 SkBool8 saveLayer;
291 fSaveIsSaveLayer.pop(&saveLayer); 291 fSaveIsSaveLayer.pop(&saveLayer);
292 if (saveLayer) { 292 if (saveLayer) {
293 fSaveLayerCount--; 293 fSaveLayerCount--;
294 } 294 }
295 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); 295 APPEND(Restore, this->devBounds(), this->getTotalMatrix());
296 } 296 }
297 297
298 void SkRecorder::onPushCull(const SkRect& rect) {
299 APPEND(PushCull, rect);
300 }
301
302 void SkRecorder::onPopCull() {
303 APPEND(PopCull);
304 }
305
306 void SkRecorder::didConcat(const SkMatrix& matrix) { 298 void SkRecorder::didConcat(const SkMatrix& matrix) {
307 this->didSetMatrix(this->getTotalMatrix()); 299 this->didSetMatrix(this->getTotalMatrix());
308 } 300 }
309 301
310 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { 302 void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
311 SkDEVCODE(if (matrix != this->getTotalMatrix()) { 303 SkDEVCODE(if (matrix != this->getTotalMatrix()) {
312 matrix.dump(); 304 matrix.dump();
313 this->getTotalMatrix().dump(); 305 this->getTotalMatrix().dump();
314 SkASSERT(matrix == this->getTotalMatrix()); 306 SkASSERT(matrix == this->getTotalMatrix());
315 }) 307 })
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 APPEND(EndCommentGroup); 343 APPEND(EndCommentGroup);
352 } 344 }
353 345
354 bool SkRecorder::isDrawingToLayer() const { 346 bool SkRecorder::isDrawingToLayer() const {
355 return fSaveLayerCount > 0; 347 return fSaveLayerCount > 0;
356 } 348 }
357 349
358 void SkRecorder::drawData(const void* data, size_t length) { 350 void SkRecorder::drawData(const void* data, size_t length) {
359 APPEND(DrawData, copy((const char*)data), length); 351 APPEND(DrawData, copy((const char*)data), length);
360 } 352 }
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698