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

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

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkBitmapProcShader.h ('k') | src/core/SkBlitter.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 SkBitmapProcShader::SkBitmapProcShader(const SkBitmap& src, TileMode tmx, TileMo de tmy, 34 SkBitmapProcShader::SkBitmapProcShader(const SkBitmap& src, TileMode tmx, TileMo de tmy,
35 const SkMatrix* localMatrix) 35 const SkMatrix* localMatrix)
36 : INHERITED(localMatrix) { 36 : INHERITED(localMatrix) {
37 fRawBitmap = src; 37 fRawBitmap = src;
38 fTileModeX = (uint8_t)tmx; 38 fTileModeX = (uint8_t)tmx;
39 fTileModeY = (uint8_t)tmy; 39 fTileModeY = (uint8_t)tmy;
40 } 40 }
41 41
42 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
43 SkBitmapProcShader::SkBitmapProcShader(SkReadBuffer& buffer) : INHERITED(buffer) {
44 buffer.readBitmap(&fRawBitmap);
45 fRawBitmap.setImmutable();
46 fTileModeX = buffer.readUInt();
47 fTileModeY = buffer.readUInt();
48 }
49 #endif
50
51 SkShader::BitmapType SkBitmapProcShader::asABitmap(SkBitmap* texture, 42 SkShader::BitmapType SkBitmapProcShader::asABitmap(SkBitmap* texture,
52 SkMatrix* texM, 43 SkMatrix* texM,
53 TileMode xy[]) const { 44 TileMode xy[]) const {
54 if (texture) { 45 if (texture) {
55 *texture = fRawBitmap; 46 *texture = fRawBitmap;
56 } 47 }
57 if (texM) { 48 if (texM) {
58 texM->reset(); 49 texM->reset();
59 } 50 }
60 if (xy) { 51 if (xy) {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 474
484 #else 475 #else
485 476
486 bool SkBitmapProcShader::asFragmentProcessor(GrContext*, const SkPaint&, const S kMatrix*, GrColor*, 477 bool SkBitmapProcShader::asFragmentProcessor(GrContext*, const SkPaint&, const S kMatrix*, GrColor*,
487 GrFragmentProcessor**) const { 478 GrFragmentProcessor**) const {
488 SkDEBUGFAIL("Should not call in GPU-less build"); 479 SkDEBUGFAIL("Should not call in GPU-less build");
489 return false; 480 return false;
490 } 481 }
491 482
492 #endif 483 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698