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

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

Issue 551463004: introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add new file Created 6 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
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.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 2011 Google Inc. 2 * Copyright 2011 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 "SkPictureRecord.h" 8 #include "SkPictureRecord.h"
9 #include "SkBBoxHierarchy.h" 9 #include "SkBBoxHierarchy.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 size_t initialOffset = this->addDraw(POP_CULL, &size); 1422 size_t initialOffset = this->addDraw(POP_CULL, &size);
1423 1423
1424 // update the cull skip offset to point past this op. 1424 // update the cull skip offset to point past this op.
1425 fWriter.overwriteTAt<uint32_t>(cullSkipOffset, SkToU32(fWriter.bytesWritten( ))); 1425 fWriter.overwriteTAt<uint32_t>(cullSkipOffset, SkToU32(fWriter.bytesWritten( )));
1426 1426
1427 this->validate(initialOffset, size); 1427 this->validate(initialOffset, size);
1428 } 1428 }
1429 1429
1430 /////////////////////////////////////////////////////////////////////////////// 1430 ///////////////////////////////////////////////////////////////////////////////
1431 1431
1432 SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info) { 1432 SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info, const SkSurfac eProps&) {
1433 return NULL; 1433 return NULL;
1434 } 1434 }
1435 1435
1436 int SkPictureRecord::addBitmap(const SkBitmap& bitmap) { 1436 int SkPictureRecord::addBitmap(const SkBitmap& bitmap) {
1437 const int index = fBitmapHeap->insert(bitmap); 1437 const int index = fBitmapHeap->insert(bitmap);
1438 // In debug builds, a bad return value from insert() will crash, allowing fo r debugging. In 1438 // In debug builds, a bad return value from insert() will crash, allowing fo r debugging. In
1439 // release builds, the invalid value will be recorded so that the reader wil l know that there 1439 // release builds, the invalid value will be recorded so that the reader wil l know that there
1440 // was a problem. 1440 // was a problem.
1441 SkASSERT(index != SkBitmapHeap::INVALID_SLOT); 1441 SkASSERT(index != SkBitmapHeap::INVALID_SLOT);
1442 this->addInt(index); 1442 this->addInt(index);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 void SkPictureRecord::addTextBlob(const SkTextBlob *blob) { 1544 void SkPictureRecord::addTextBlob(const SkTextBlob *blob) {
1545 int index = fTextBlobRefs.count(); 1545 int index = fTextBlobRefs.count();
1546 *fTextBlobRefs.append() = blob; 1546 *fTextBlobRefs.append() = blob;
1547 blob->ref(); 1547 blob->ref();
1548 // follow the convention of recording a 1-based index 1548 // follow the convention of recording a 1-based index
1549 this->addInt(index + 1); 1549 this->addInt(index + 1);
1550 } 1550 }
1551 1551
1552 /////////////////////////////////////////////////////////////////////////////// 1552 ///////////////////////////////////////////////////////////////////////////////
1553 1553
OLDNEW
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698