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

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

Issue 26702002: force readbuffer clients to use specialized readFoo for flattenables (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkComposeShader.cpp » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 this->INHERITED::toString(str); 676 this->INHERITED::toString(str);
677 677
678 str->append(")"); 678 str->append(")");
679 } 679 }
680 #endif 680 #endif
681 681
682 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader) 682 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader)
683 683
684 protected: 684 protected:
685 Sk3DShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) { 685 Sk3DShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
686 fProxy = buffer.readFlattenableT<SkShader>(); 686 fProxy = buffer.readShader();
687 fPMColor = buffer.readColor(); 687 fPMColor = buffer.readColor();
688 fMask = NULL; 688 fMask = NULL;
689 } 689 }
690 690
691 virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE { 691 virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {
692 this->INHERITED::flatten(buffer); 692 this->INHERITED::flatten(buffer);
693 buffer.writeFlattenable(fProxy); 693 buffer.writeFlattenable(fProxy);
694 buffer.writeColor(fPMColor); 694 buffer.writeColor(fPMColor);
695 } 695 }
696 696
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1007
1008 fShader->ref(); 1008 fShader->ref();
1009 fShaderFlags = fShader->getFlags(); 1009 fShaderFlags = fShader->getFlags();
1010 } 1010 }
1011 1011
1012 SkShaderBlitter::~SkShaderBlitter() { 1012 SkShaderBlitter::~SkShaderBlitter() {
1013 SkASSERT(fShader->setContextHasBeenCalled()); 1013 SkASSERT(fShader->setContextHasBeenCalled());
1014 fShader->endContext(); 1014 fShader->endContext();
1015 fShader->unref(); 1015 fShader->unref();
1016 } 1016 }
OLDNEW
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698