Home
last modified time | relevance | path

Searched refs:kPad (Results 1 – 25 of 105) sorted by relevance

12345

/external/tensorflow/tensorflow/core/kernels/image/
Dmirror_pad_op_test.cc92 const int kPad = 10; in REGISTER_TEST() local
93 const int kOutput = kInput + 2 * kPad; in REGISTER_TEST()
103 {0, 0, kPad, kPad, kPad, kPad, 0, 0}); in REGISTER_TEST()
109 if (0 <= i && i < kPad) in REGISTER_TEST()
110 return kPad - i; in REGISTER_TEST()
111 else if (kPad <= i && i < kInput + kPad) in REGISTER_TEST()
112 return i - kPad; in REGISTER_TEST()
113 else if (kInput + kPad <= i && i < kOutput) in REGISTER_TEST()
114 return 2 * kInput + kPad - 2 - i; in REGISTER_TEST()
126 const int kPad = 10; in TEST_F() local
[all …]
/external/skia/tests/
DSpecialImageTest.cpp31 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 …]
/external/skqp/tests/
DSpecialImageTest.cpp33 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/skia/gm/
Dstrokedlines.cpp36 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()
Ddrawatlascolor.cpp79 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
Dcirculararcs.cpp36 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 …]
Dsimple_magnification.cpp94 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
Dconstcolorprocessor.cpp97 SkScalar y = kPad; in onDraw()
98 SkScalar x = kPad; in onDraw()
169 canvas->drawString(inputLabel, renderRect.fRight + kPad, -inputLabelBounds.fTop, in onDraw()
172 inputLabelBounds.offset(renderRect.fRight + kPad, -inputLabelBounds.fTop); in onDraw()
177 canvas->drawString(procLabel, renderRect.fRight + kPad, in onDraw()
180 procLabelBounds.offset(renderRect.fRight + kPad, in onDraw()
193 y += height + kPad; in onDraw()
195 y = kPad; in onDraw()
196 x += maxW + kPad; in onDraw()
208 static constexpr SkScalar kPad = 10.f; member in skiagm::ColorProcessor
Dstroke_rect_shader.cpp40 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);
Dducky_yuv_blend.cpp44 static constexpr int kPad = 10; variable
47 canvas->translate(kPad, kPad);
51 canvas->translate(0, kDstRect.height() + kPad); in __anon413bcd0a0102()
58 canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, (kDstRect.height() + kPad)/5);
67 canvas->translate(kDstRect.width() + kPad, 0);
Drectangletexture.cpp154 static constexpr SkScalar kPad = 5.f; in onDraw() local
165 canvas->translate(kPad, kPad); in onDraw()
176 canvas->translate(w + kPad, 0); in onDraw()
182 canvas->translate(1.5f*w + kPad, 0); in onDraw()
190 canvas->translate(1.5f*w + kPad, 0); in onDraw()
197 canvas->translate(.5f*w + kPad, 0); in onDraw()
200 canvas->translate(0, kPad + 1.5f*h*s); in onDraw()
226 canvas->translate(dstRect.width() + kPad, 0); in onDraw()
229 canvas->translate(0, dstRect.height() + kPad); in onDraw()
232 canvas->translate((dstRect.width() + kPad)*kSkTileModeCount, 0); in onDraw()
Dpathmaskcache.cpp34 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()
Dblurcircles2.cpp86 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()
Dbigrrectaaeffect.cpp50 fTestOffsetX = fTestWidth + kPad; in BigRRectAAEffectGM()
51 fTestOffsetY = fTestHeight + kPad; in BigRRectAAEffectGM()
55 fWidth = 2 * fTestOffsetX + kPad; in BigRRectAAEffectGM()
56 fHeight = fTestOffsetY + kPad; in BigRRectAAEffectGM()
72 int y = kPad; in onDraw()
73 int x = kPad; in onDraw()
115 static constexpr int kPad = 7; member in skiagm::BigRRectAAEffectGM
/external/skqp/gm/
Dstrokedlines.cpp20 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()
Ddrawatlascolor.cpp66 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
Dconstcolorprocessor.cpp81 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
Dcirculararcs.cpp19 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 …]
Dsimple_magnification.cpp82 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
Dstroke_rect_shader.cpp28 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);
Dpathmaskcache.cpp27 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()
Dblurcircles2.cpp79 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()
Dbigrrectaaeffect.cpp33 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
/external/skqp/samplecode/
DSampleShadowUtils.cpp169 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/skia/samplecode/
DSampleShadowUtils.cpp161 static constexpr SkScalar kPad = 15.f; in onDrawContent() local
168 canvas->translate(3 * kPad, 3 * kPad); in onDrawContent()
189 SkScalar dx = w + kPad; in onDrawContent()
190 if (x + dx > kW - 3 * kPad) { in onDrawContent()
206 dy = std::max(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()
213 canvas->translate(kPad, dy); in onDrawContent()
215 x = kPad; in onDrawContent()
222 SkScalar dx = w + kPad; in onDrawContent()
232 dy = std::max(dy, postMBounds.height() + kPad + kHeight); in onDrawContent()

12345