/external/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() 97 img->draw(canvas, SkIntToScalar(kPad), SkIntToScalar(kPad), nullptr); in test_image() 106 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1)); in test_image() 107 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad)); in test_image() 108 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1, in test_image() 109 kSmallerSize+kPad-1)); in test_image() 110 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kSmallerSize+kPad, in test_image() 111 kSmallerSize+kPad)); in test_image() [all …]
|
/external/skqp/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() 97 img->draw(canvas, SkIntToScalar(kPad), SkIntToScalar(kPad), nullptr); in test_image() 106 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1)); in test_image() 107 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad)); in test_image() 108 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1, in test_image() 109 kSmallerSize+kPad-1)); in test_image() 110 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kSmallerSize+kPad, in test_image() 111 kSmallerSize+kPad)); in test_image() [all …]
|
/external/skqp/gm/ |
D | strokedlines.cpp | 20 constexpr int kPad = 5; // padding on both sides of the snowflake variable 51 canvas->clipRect(SkRect::MakeLTRB(-kRadius-kPad, -kRadius-kPad, kRadius+kPad, kRadius+kPad)); in draw_snowflake() 76 canvas->translate(kRadius+kPad, 0.0f); in draw_row() 91 canvas->translate(2*(kRadius+kPad), 0.0f); in draw_row() 112 return SkISize::Make(kNumColumns * (2*kRadius+2*kPad), kNumRows * (2*kRadius+2*kPad)); in onISize() 126 SkPoint pts[] = { {-kRadius-kPad, -kRadius-kPad }, { kRadius+kPad, kRadius+kPad } }; in onOnceBeforeDraw() 199 canvas->translate(0, kRadius+kPad); in onDraw() 206 canvas->translate(0, 2*(kRadius+kPad)); in onDraw() 214 canvas->translate(0, 2*(kRadius+kPad)); in onDraw()
|
D | drawatlascolor.cpp | 66 return SkISize::Make(kNumXferModes * (kAtlasSize + kPad) + kPad, in onISize() 67 2 * kNumColors * (kAtlasSize + kPad) + kTextPad + kPad); in onISize() 126 xforms[i].set(1.0f, 0.0f, SkIntToScalar(kPad), i*(target.width()+kPad)); in onDraw() 135 canvas->drawString(label, i*(target.width()+kPad)+kPad, SkIntToScalar(kTextPad), in onDraw() 141 canvas->translate(SkIntToScalar(i*(target.height()+kPad)), in onDraw() 142 SkIntToScalar(kTextPad+kPad)); in onDraw() 146 canvas->translate(0.0f, numColors*(target.height()+kPad)); in onDraw() 158 static constexpr int kPad = 2; member in DrawAtlasColorsGM
|
D | circulararcs.cpp | 19 constexpr SkScalar kPad = 20.f; variable 39 canvas->translate(kPad + x, kPad + y); in draw_arcs() 45 canvas->translate(kRect.width() + kPad, 0.f); in draw_arcs() 48 canvas->translate(0, kRect.height() + kPad); in draw_arcs() 181 canvas->translate(kPad, kPad); 194 SkScalar midX = SK_ARRAY_COUNT(arcs) * (kS + kPad) - kPad/2.f; 195 SkScalar height = paints.count() * (kS + kPad); 196 canvas->drawLine(midX, -kPad, midX, height, linePaint); 203 canvas->translate(kS + kPad, 0.f); 207 canvas->translate(kS + kPad, 0.f); [all …]
|
D | constcolorprocessor.cpp | 81 SkScalar y = kPad; in onDraw() 82 SkScalar x = kPad; in onDraw() 136 canvas->drawString(inputLabel, renderRect.fRight + kPad, -inputLabelBounds.fTop, in onDraw() 139 inputLabelBounds.offset(renderRect.fRight + kPad, -inputLabelBounds.fTop); in onDraw() 144 canvas->drawString(procLabel, renderRect.fRight + kPad, in onDraw() 147 procLabelBounds.offset(renderRect.fRight + kPad, in onDraw() 160 y += height + kPad; in onDraw() 162 y = kPad; in onDraw() 163 x += maxW + kPad; in onDraw() 175 static constexpr SkScalar kPad = 10.f; member in skiagm::ConstColorProcessor
|
D | simple_magnification.cpp | 82 return SkISize::Make(3*kPad+2*kImgSize, 3*kPad+2*kImgSize); in onISize() 111 int bigOffset = 2 * kPad + kImgSize; in onDraw() 113 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, kPad), 1); in onDraw() 114 this->draw(canvas, topLImg, SkIPoint::Make(bigOffset, kPad), 1); in onDraw() 115 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, bigOffset), 7); in onDraw() 121 static const int kPad = 2; member in SimpleMagnificationGM
|
D | stroke_rect_shader.cpp | 28 constexpr SkScalar kPad = 20; variable 38 canvas->translate(kRect.width() + kPad, 0); 42 canvas->translate(kRect.width() + kPad, 0); 47 canvas->translate(kRect.width() + kPad, 0); 51 canvas->translate(kRect.width() + kPad, 0); 57 canvas->translate(0, kRect.height() + kPad);
|
D | pathmaskcache.cpp | 27 static constexpr SkScalar kPad = 5.f; in onDraw() local 46 canvas->translate(bounds.width() + kPad, 0.f); in onDraw() 53 canvas->translate(bounds.width() + kPad + 0.15f, 0.f); in onDraw() 60 canvas->translate(bounds.width() + kPad + 0.002f, 0.f); in onDraw() 66 return bounds.fBottom + kPad; in onDraw() 84 canvas->translate(kPad, kPad); in onDraw()
|
D | blurcircles2.cpp | 79 constexpr SkScalar kPad = 5; in onDraw() local 82 canvas->translate(kPad + kMinRadius + kMaxBlurRadius, in onDraw() 83 kPad + kMinRadius + kMaxBlurRadius); in onDraw() 91 lineWidth += 2 * (radius + kMaxBlurRadius) + kPad; in onDraw() 113 canvas->translate(0, 2 * maxRowR + kPad); in onDraw() 119 canvas->translate(maxColR * 2 + kPad, 0); in onDraw() 125 const SkScalar lineY = 3 * maxRowR + 1.5f * kPad; in onDraw() 130 canvas->translate(0, maxRowR * 4 + 2 * kPad); in onDraw()
|
D | bigrrectaaeffect.cpp | 33 fTestOffsetX = fTestWidth + kPad; in BigRRectAAEffectGM() 34 fTestOffsetY = fTestHeight + kPad; in BigRRectAAEffectGM() 38 fWidth = 2 * fTestOffsetX + kPad; in BigRRectAAEffectGM() 39 fHeight = fTestOffsetY + kPad; in BigRRectAAEffectGM() 66 int y = kPad; in onDraw() 67 int x = kPad; in onDraw() 108 static constexpr int kPad = 7; member in skiagm::BigRRectAAEffectGM
|
D | shadowutils.cpp | 67 static constexpr SkScalar kPad = 15.f; in draw_paths() local 75 canvas->translate(3 * kPad, 3 * kPad); in draw_paths() 90 SkScalar dx = w + kPad; in draw_paths() 91 if (x + dx > kW - 3 * kPad) { in draw_paths() 137 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in draw_paths() 144 canvas->translate(kPad, dy); in draw_paths() 146 x = kPad; in draw_paths() 154 SkScalar dx = w + kPad; in draw_paths() 187 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in draw_paths()
|
/external/skia/gm/ |
D | strokedlines.cpp | 20 constexpr int kPad = 5; // padding on both sides of the snowflake variable 51 canvas->clipRect(SkRect::MakeLTRB(-kRadius-kPad, -kRadius-kPad, kRadius+kPad, kRadius+kPad)); in draw_snowflake() 76 canvas->translate(kRadius+kPad, 0.0f); in draw_row() 91 canvas->translate(2*(kRadius+kPad), 0.0f); in draw_row() 112 return SkISize::Make(kNumColumns * (2*kRadius+2*kPad), kNumRows * (2*kRadius+2*kPad)); in onISize() 126 SkPoint pts[] = { {-kRadius-kPad, -kRadius-kPad }, { kRadius+kPad, kRadius+kPad } }; in onOnceBeforeDraw() 199 canvas->translate(0, kRadius+kPad); in onDraw() 206 canvas->translate(0, 2*(kRadius+kPad)); in onDraw() 214 canvas->translate(0, 2*(kRadius+kPad)); in onDraw()
|
D | drawatlascolor.cpp | 66 return SkISize::Make(kNumXferModes * (kAtlasSize + kPad) + kPad, in onISize() 67 2 * kNumColors * (kAtlasSize + kPad) + kTextPad + kPad); in onISize() 126 xforms[i].set(1.0f, 0.0f, SkIntToScalar(kPad), i*(target.width()+kPad)); in onDraw() 135 canvas->drawString(label, i*(target.width()+kPad)+kPad, SkIntToScalar(kTextPad), in onDraw() 141 canvas->translate(SkIntToScalar(i*(target.height()+kPad)), in onDraw() 142 SkIntToScalar(kTextPad+kPad)); in onDraw() 146 canvas->translate(0.0f, numColors*(target.height()+kPad)); in onDraw() 158 static constexpr int kPad = 2; member in DrawAtlasColorsGM
|
D | constcolorprocessor.cpp | 70 SkScalar y = kPad; in onDraw() 71 SkScalar x = kPad; in onDraw() 125 canvas->drawString(inputLabel, renderRect.fRight + kPad, -inputLabelBounds.fTop, in onDraw() 128 inputLabelBounds.offset(renderRect.fRight + kPad, -inputLabelBounds.fTop); in onDraw() 133 canvas->drawString(procLabel, renderRect.fRight + kPad, in onDraw() 136 procLabelBounds.offset(renderRect.fRight + kPad, in onDraw() 149 y += height + kPad; in onDraw() 151 y = kPad; in onDraw() 152 x += maxW + kPad; in onDraw() 164 static constexpr SkScalar kPad = 10.f; member in skiagm::ConstColorProcessor
|
D | circulararcs.cpp | 19 constexpr SkScalar kPad = 20.f; variable 39 canvas->translate(kPad + x, kPad + y); in draw_arcs() 45 canvas->translate(kRect.width() + kPad, 0.f); in draw_arcs() 48 canvas->translate(0, kRect.height() + kPad); in draw_arcs() 181 canvas->translate(kPad, kPad); 194 SkScalar midX = SK_ARRAY_COUNT(arcs) * (kS + kPad) - kPad/2.f; 195 SkScalar height = paints.count() * (kS + kPad); 196 canvas->drawLine(midX, -kPad, midX, height, linePaint); 203 canvas->translate(kS + kPad, 0.f); 207 canvas->translate(kS + kPad, 0.f); [all …]
|
D | simple_magnification.cpp | 82 return SkISize::Make(3*kPad+2*kImgSize, 3*kPad+2*kImgSize); in onISize() 112 int bigOffset = 2 * kPad + kImgSize; in onDraw() 114 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, kPad), 1); in onDraw() 115 this->draw(canvas, topLImg, SkIPoint::Make(bigOffset, kPad), 1); in onDraw() 116 this->draw(canvas, bottomLImg, SkIPoint::Make(kPad, bigOffset), 7); in onDraw() 123 static const int kPad = 2; member in SimpleMagnificationGM
|
D | stroke_rect_shader.cpp | 28 constexpr SkScalar kPad = 20; variable 38 canvas->translate(kRect.width() + kPad, 0); 42 canvas->translate(kRect.width() + kPad, 0); 47 canvas->translate(kRect.width() + kPad, 0); 51 canvas->translate(kRect.width() + kPad, 0); 57 canvas->translate(0, kRect.height() + kPad);
|
D | pathmaskcache.cpp | 27 static constexpr SkScalar kPad = 5.f; in onDraw() local 46 canvas->translate(bounds.width() + kPad, 0.f); in onDraw() 53 canvas->translate(bounds.width() + kPad + 0.15f, 0.f); in onDraw() 60 canvas->translate(bounds.width() + kPad + 0.002f, 0.f); in onDraw() 66 return bounds.fBottom + kPad; in onDraw() 84 canvas->translate(kPad, kPad); in onDraw()
|
D | blurcircles2.cpp | 79 constexpr SkScalar kPad = 5; in onDraw() local 82 canvas->translate(kPad + kMinRadius + kMaxBlurRadius, in onDraw() 83 kPad + kMinRadius + kMaxBlurRadius); in onDraw() 91 lineWidth += 2 * (radius + kMaxBlurRadius) + kPad; in onDraw() 113 canvas->translate(0, 2 * maxRowR + kPad); in onDraw() 119 canvas->translate(maxColR * 2 + kPad, 0); in onDraw() 125 const SkScalar lineY = 3 * maxRowR + 1.5f * kPad; in onDraw() 130 canvas->translate(0, maxRowR * 4 + 2 * kPad); in onDraw()
|
D | imagefromyuvtextures.cpp | 45 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 | 33 fTestOffsetX = fTestWidth + kPad; in BigRRectAAEffectGM() 34 fTestOffsetY = fTestHeight + kPad; in BigRRectAAEffectGM() 38 fWidth = 2 * fTestOffsetX + kPad; in BigRRectAAEffectGM() 39 fHeight = fTestOffsetY + kPad; in BigRRectAAEffectGM() 55 int y = kPad; in onDraw() 56 int x = kPad; in onDraw() 97 static constexpr int kPad = 7; member in skiagm::BigRRectAAEffectGM
|
D | shadowutils.cpp | 67 static constexpr SkScalar kPad = 15.f; in draw_paths() local 75 canvas->translate(3 * kPad, 3 * kPad); in draw_paths() 90 SkScalar dx = w + kPad; in draw_paths() 91 if (x + dx > kW - 3 * kPad) { in draw_paths() 137 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in draw_paths() 144 canvas->translate(kPad, dy); in draw_paths() 146 x = kPad; in draw_paths() 154 SkScalar dx = w + kPad; in draw_paths() 187 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in draw_paths()
|
/external/skia/samplecode/ |
D | SampleShadowUtils.cpp | 169 static constexpr SkScalar kPad = 15.f; in onDrawContent() local 176 canvas->translate(3 * kPad, 3 * kPad); in onDrawContent() 197 SkScalar dx = w + kPad; in onDrawContent() 198 if (x + dx > kW - 3 * kPad) { in onDrawContent() 214 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent() 221 canvas->translate(kPad, dy); in onDrawContent() 223 x = kPad; in onDrawContent() 230 SkScalar dx = w + kPad; in onDrawContent() 240 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()
|
/external/skqp/samplecode/ |
D | SampleShadowUtils.cpp | 169 static constexpr SkScalar kPad = 15.f; in onDrawContent() local 176 canvas->translate(3 * kPad, 3 * kPad); in onDrawContent() 197 SkScalar dx = w + kPad; in onDrawContent() 198 if (x + dx > kW - 3 * kPad) { in onDrawContent() 214 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent() 221 canvas->translate(kPad, dy); in onDrawContent() 223 x = kPad; in onDrawContent() 230 SkScalar dx = w + kPad; in onDrawContent() 240 dy = SkTMax(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()
|