/third_party/skia/tests/ |
D | SpecialImageTest.cpp | 31 static const int kPad = 3; variable 32 static const int kFullSize = kSmallerSize + 2 * kPad; 49 temp.drawRect(SkRect::MakeXYWH(SkIntToScalar(kPad), SkIntToScalar(kPad), in create_bm() 61 REPORTER_ASSERT(reporter, kPad == subset.left()); in test_image() 62 REPORTER_ASSERT(reporter, kPad == subset.top()); in test_image() 95 img->draw(canvas, SkIntToScalar(kPad), SkIntToScalar(kPad)); in test_image() 104 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1)); in test_image() 105 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad)); in test_image() 106 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1, in test_image() 107 kSmallerSize+kPad-1)); in test_image() [all …]
|
/third_party/flutter/skia/tests/ |
D | SpecialImageTest.cpp | 33 static const int kPad = 3; variable 34 static const int kFullSize = kSmallerSize + 2 * kPad; 48 temp.drawRect(SkRect::MakeXYWH(SkIntToScalar(kPad), SkIntToScalar(kPad), in create_bm() 59 REPORTER_ASSERT(reporter, kPad == subset.left()); in test_image() 60 REPORTER_ASSERT(reporter, kPad == subset.top()); in test_image() 91 img->draw(canvas, SkIntToScalar(kPad), SkIntToScalar(kPad), nullptr); in test_image() 100 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1)); in test_image() 101 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad)); in test_image() 102 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1, in test_image() 103 kSmallerSize+kPad-1)); in test_image() [all …]
|
/third_party/flutter/skia/gm/ |
D | strokedlines.cpp | 36 constexpr int kPad = 5; // padding on both sides of the snowflake variable 69 canvas->clipRect(SkRect::MakeLTRB(-kRadius-kPad, -kRadius-kPad, kRadius+kPad, kRadius+kPad)); in draw_snowflake() 95 canvas->translate(kRadius+kPad, 0.0f); in draw_row() 110 canvas->translate(2*(kRadius+kPad), 0.0f); in draw_row() 129 return SkISize::Make(kNumColumns * (2*kRadius+2*kPad), kNumRows * (2*kRadius+2*kPad)); in onISize() 143 SkPoint pts[] = { {-kRadius-kPad, -kRadius-kPad }, { kRadius+kPad, kRadius+kPad } }; in onOnceBeforeDraw() 212 canvas->translate(0, kRadius+kPad); in onDraw() 219 canvas->translate(0, 2*(kRadius+kPad)); in onDraw() 227 canvas->translate(0, 2*(kRadius+kPad)); in onDraw()
|
D | drawatlascolor.cpp | 79 return SkISize::Make(kNumXferModes * (kAtlasSize + kPad) + kPad, in onISize() 80 2 * kNumColors * (kAtlasSize + kPad) + kTextPad + kPad); in onISize() 139 xforms[i].set(1.0f, 0.0f, SkIntToScalar(kPad), i*(target.width()+kPad)); in onDraw() 148 canvas->drawString(label, i*(target.width()+kPad)+kPad, SkIntToScalar(kTextPad), in onDraw() 154 canvas->translate(SkIntToScalar(i*(target.height()+kPad)), in onDraw() 155 SkIntToScalar(kTextPad+kPad)); in onDraw() 159 canvas->translate(0.0f, numColors*(target.height()+kPad)); in onDraw() 171 static constexpr int kPad = 2; member in DrawAtlasColorsGM
|
D | constcolorprocessor.cpp | 94 SkScalar y = kPad; in onDraw() 95 SkScalar x = kPad; in onDraw() 149 canvas->drawString(inputLabel, renderRect.fRight + kPad, -inputLabelBounds.fTop, in onDraw() 152 inputLabelBounds.offset(renderRect.fRight + kPad, -inputLabelBounds.fTop); in onDraw() 157 canvas->drawString(procLabel, renderRect.fRight + kPad, in onDraw() 160 procLabelBounds.offset(renderRect.fRight + kPad, in onDraw() 173 y += height + kPad; in onDraw() 175 y = kPad; in onDraw() 176 x += maxW + kPad; in onDraw() 188 static constexpr SkScalar kPad = 10.f; member in skiagm::ConstColorProcessor
|
D | circulararcs.cpp | 29 constexpr SkScalar kPad = 20.f; variable 49 canvas->translate(kPad + x, kPad + y); in draw_arcs() 55 canvas->translate(kRect.width() + kPad, 0.f); in draw_arcs() 58 canvas->translate(0, kRect.height() + kPad); in draw_arcs() 191 canvas->translate(kPad, kPad); 204 SkScalar midX = SK_ARRAY_COUNT(arcs) * (kS + kPad) - kPad/2.f; 205 SkScalar height = paints.count() * (kS + kPad); 206 canvas->drawLine(midX, -kPad, midX, height, linePaint); 213 canvas->translate(kS + kPad, 0.f); 217 canvas->translate(kS + kPad, 0.f); [all …]
|
D | simple_magnification.cpp | 96 return SkISize::Make(3*kPad+2*kImgSize, 3*kPad+2*kImgSize); in onISize() 126 int bigOffset = 2 * kPad + kImgSize; in onDraw() 128 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, kPad), 1); in onDraw() 129 this->draw(canvas, topLImg, SkIPoint::Make(bigOffset, kPad), 1); in onDraw() 130 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, bigOffset), 7); in onDraw() 137 static const int kPad = 2; member in SimpleMagnificationGM
|
D | pathmaskcache.cpp | 34 static constexpr SkScalar kPad = 5.f; in onDraw() local 53 canvas->translate(bounds.width() + kPad, 0.f); in onDraw() 60 canvas->translate(bounds.width() + kPad + 0.15f, 0.f); in onDraw() 67 canvas->translate(bounds.width() + kPad + 0.002f, 0.f); in onDraw() 73 return bounds.fBottom + kPad; in onDraw() 91 canvas->translate(kPad, kPad); in onDraw()
|
D | stroke_rect_shader.cpp | 40 constexpr SkScalar kPad = 20; variable 50 canvas->translate(kRect.width() + kPad, 0); 54 canvas->translate(kRect.width() + kPad, 0); 59 canvas->translate(kRect.width() + kPad, 0); 63 canvas->translate(kRect.width() + kPad, 0); 69 canvas->translate(0, kRect.height() + kPad);
|
D | blurcircles2.cpp | 87 constexpr SkScalar kPad = 5; in onDraw() local 90 canvas->translate(kPad + kMinRadius + kMaxBlurRadius, in onDraw() 91 kPad + kMinRadius + kMaxBlurRadius); in onDraw() 99 lineWidth += 2 * (radius + kMaxBlurRadius) + kPad; in onDraw() 121 canvas->translate(0, 2 * maxRowR + kPad); in onDraw() 127 canvas->translate(maxColR * 2 + kPad, 0); in onDraw() 133 const SkScalar lineY = 3 * maxRowR + 1.5f * kPad; in onDraw() 138 canvas->translate(0, maxRowR * 4 + 2 * kPad); in onDraw()
|
D | imagefromyuvtextures.cpp | 63 return SkISize::Make(kBmpSize + 2 * kPad, 390); in onISize() 160 SkScalar yOffset = kPad; in onDraw() 161 canvas->drawImage(fRGBImage.get(), kPad, yOffset); in onDraw() 162 yOffset += kBmpSize + kPad; in onDraw() 179 canvas->drawImage(image.get(), kPad, yOffset, &paint); in onDraw() 180 yOffset += kBmpSize + kPad; in onDraw() 201 canvas->drawImage(image.get(), kPad, yOffset, &paint); in onDraw() 202 yOffset += kBmpSize + kPad; in onDraw() 218 static constexpr SkScalar kPad = 10.0f; member in skiagm::ImageFromYUVTextures
|
D | bigrrectaaeffect.cpp | 52 fTestOffsetX = fTestWidth + kPad; in BigRRectAAEffectGM() 53 fTestOffsetY = fTestHeight + kPad; in BigRRectAAEffectGM() 57 fWidth = 2 * fTestOffsetX + kPad; in BigRRectAAEffectGM() 58 fHeight = fTestOffsetY + kPad; in BigRRectAAEffectGM() 74 int y = kPad; in onDraw() 75 int x = kPad; in onDraw() 116 static constexpr int kPad = 7; member in skiagm::BigRRectAAEffectGM
|
/third_party/skia/gm/ |
D | strokedlines.cpp | 36 constexpr int kPad = 5; // padding on both sides of the snowflake variable 69 canvas->clipRect(SkRect::MakeLTRB(-kRadius-kPad, -kRadius-kPad, kRadius+kPad, kRadius+kPad)); in draw_snowflake() 95 canvas->translate(kRadius+kPad, 0.0f); in draw_row() 110 canvas->translate(2*(kRadius+kPad), 0.0f); in draw_row() 129 return SkISize::Make(kNumColumns * (2*kRadius+2*kPad), kNumRows * (2*kRadius+2*kPad)); in onISize() 143 SkPoint pts[] = { {-kRadius-kPad, -kRadius-kPad }, { kRadius+kPad, kRadius+kPad } }; in onOnceBeforeDraw() 213 canvas->translate(0, kRadius+kPad); in onDraw() 220 canvas->translate(0, 2*(kRadius+kPad)); in onDraw() 228 canvas->translate(0, 2*(kRadius+kPad)); in onDraw()
|
D | drawatlascolor.cpp | 79 return SkISize::Make(kNumXferModes * (kAtlasSize + kPad) + kPad, in onISize() 80 2 * kNumColors * (kAtlasSize + kPad) + kTextPad + kPad); in onISize() 139 xforms[i].set(1.0f, 0.0f, SkIntToScalar(kPad), i*(target.width()+kPad)); in onDraw() 148 canvas->drawString(label, i*(target.width()+kPad)+kPad, SkIntToScalar(kTextPad), in onDraw() 154 canvas->translate(SkIntToScalar(i*(target.height()+kPad)), in onDraw() 155 SkIntToScalar(kTextPad+kPad)); in onDraw() 159 canvas->translate(0.0f, numColors*(target.height()+kPad)); in onDraw() 171 inline static constexpr int kPad = 2; member in DrawAtlasColorsGM
|
D | circulararcs.cpp | 36 constexpr SkScalar kPad = 20.f; variable 56 canvas->translate(kPad + x, kPad + y); in draw_arcs() 62 canvas->translate(kRect.width() + kPad, 0.f); in draw_arcs() 65 canvas->translate(0, kRect.height() + kPad); in draw_arcs() 198 canvas->translate(kPad, kPad); 211 SkScalar midX = SK_ARRAY_COUNT(arcs) * (kS + kPad) - kPad/2.f; 212 SkScalar height = paints.count() * (kS + kPad); 213 canvas->drawLine(midX, -kPad, midX, height, linePaint); 220 canvas->translate(kS + kPad, 0.f); 224 canvas->translate(kS + kPad, 0.f); [all …]
|
D | constcolorprocessor.cpp | 100 SkScalar y = kPad; in onDraw() 101 SkScalar x = kPad; in onDraw() 167 canvas->drawString(inputLabel, renderRect.fRight + kPad, -inputLabelBounds.fTop, in onDraw() 170 inputLabelBounds.offset(renderRect.fRight + kPad, -inputLabelBounds.fTop); in onDraw() 175 canvas->drawString(procLabel, renderRect.fRight + kPad, in onDraw() 178 procLabelBounds.offset(renderRect.fRight + kPad, in onDraw() 191 y += height + kPad; in onDraw() 193 y = kPad; in onDraw() 194 x += maxW + kPad; in onDraw() 208 inline static constexpr SkScalar kPad = 10.f; member in skiagm::ColorProcessor
|
D | simple_magnification.cpp | 94 return SkISize::Make(3*kPad+2*kImgSize, 3*kPad+2*kImgSize); in onISize() 124 int bigOffset = 2 * kPad + kImgSize; in onDraw() 126 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, kPad), 1); in onDraw() 127 this->draw(canvas, topLImg, SkIPoint::Make(bigOffset, kPad), 1); in onDraw() 128 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, bigOffset), 7); in onDraw() 135 static const int kPad = 2; member in SimpleMagnificationGM
|
D | rectangletexture.cpp | 150 static constexpr SkScalar kPad = 5.f; in onDraw() local 161 canvas->translate(kPad, kPad); in onDraw() 172 canvas->translate(w + kPad, 0); in onDraw() 178 canvas->translate(1.5f*w + kPad, 0); in onDraw() 186 canvas->translate(1.5f*w + kPad, 0); in onDraw() 193 canvas->translate(.5f*w + kPad, 0); in onDraw() 196 canvas->translate(0, kPad + 1.5f*h*scale); in onDraw() 229 canvas->translate(dstRect.width() + kPad, 0); in onDraw() 232 canvas->translate(0, dstRect.height() + kPad); in onDraw() 235 canvas->translate((dstRect.width() + kPad)*kSkTileModeCount, 0); in onDraw()
|
D | pathmaskcache.cpp | 34 static constexpr SkScalar kPad = 5.f; in onDraw() local 53 canvas->translate(bounds.width() + kPad, 0.f); in onDraw() 60 canvas->translate(bounds.width() + kPad + 0.15f, 0.f); in onDraw() 67 canvas->translate(bounds.width() + kPad + 0.002f, 0.f); in onDraw() 73 return bounds.fBottom + kPad; in onDraw() 91 canvas->translate(kPad, kPad); in onDraw()
|
D | stroke_rect_shader.cpp | 40 constexpr SkScalar kPad = 20; variable 50 canvas->translate(kRect.width() + kPad, 0); 54 canvas->translate(kRect.width() + kPad, 0); 59 canvas->translate(kRect.width() + kPad, 0); 63 canvas->translate(kRect.width() + kPad, 0); 69 canvas->translate(0, kRect.height() + kPad);
|
D | ducky_yuv_blend.cpp | 44 static constexpr int kPad = 10; variable 47 canvas->translate(kPad, kPad); 51 canvas->translate(0, kDstRect.height() + kPad); in __anon9e22eef30102() 58 canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, (kDstRect.height() + kPad)/5); 67 canvas->translate(kDstRect.width() + kPad, 0);
|
D | blurcircles2.cpp | 86 constexpr SkScalar kPad = 5; in onDraw() local 89 canvas->translate(kPad + kMinRadius + kMaxBlurRadius, in onDraw() 90 kPad + kMinRadius + kMaxBlurRadius); in onDraw() 98 lineWidth += 2 * (radius + kMaxBlurRadius) + kPad; in onDraw() 120 canvas->translate(0, 2 * maxRowR + kPad); in onDraw() 126 canvas->translate(maxColR * 2 + kPad, 0); in onDraw() 132 const SkScalar lineY = 3 * maxRowR + 1.5f * kPad; in onDraw() 137 canvas->translate(0, maxRowR * 4 + 2 * kPad); in onDraw()
|
D | bigrrectaaeffect.cpp | 50 fTestOffsetX = fTestWidth + kPad; in BigRRectAAEffectGM() 51 fTestOffsetY = fTestHeight + kPad; in BigRRectAAEffectGM() 55 fWidth = 2 * fTestOffsetX + kPad; in BigRRectAAEffectGM() 56 fHeight = fTestOffsetY + kPad; in BigRRectAAEffectGM() 75 int y = kPad; in onDraw() 76 int x = kPad; in onDraw() 120 inline static constexpr int kPad = 7; member in skiagm::BigRRectAAEffectGM
|
/third_party/flutter/skia/samplecode/ |
D | SampleShadowUtils.cpp | 162 static constexpr SkScalar kPad = 15.f; in onDrawContent() local 169 canvas->translate(3 * kPad, 3 * kPad); in onDrawContent() 190 SkScalar dx = w + kPad; in onDrawContent() 191 if (x + dx > kW - 3 * kPad) { in onDrawContent() 207 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent() 214 canvas->translate(kPad, dy); in onDrawContent() 216 x = kPad; in onDrawContent() 223 SkScalar dx = w + kPad; in onDrawContent() 233 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()
|
/third_party/skia/samplecode/ |
D | SampleShadowUtils.cpp | 161 static constexpr SkScalar kPad = 15.f; in onDrawContent() local 168 canvas->translate(3 * kPad, 3 * kPad); in onDrawContent() 187 SkScalar dx = w + kPad; in onDrawContent() 188 if (x + dx > kW - 3 * kPad) { in onDrawContent() 204 dy = std::max(dy, postMBounds.height() + kPad + kHeight); in onDrawContent() 211 canvas->translate(kPad, dy); in onDrawContent() 213 x = kPad; in onDrawContent() 220 SkScalar dx = w + kPad; in onDrawContent() 230 dy = std::max(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()
|