| /third_party/skia/src/sksl/ir/ |
| D | SkSLSetting.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 24 virtual std::unique_ptr<Expression> value(const Context& context) const = 0; 36 std::unique_ptr<Expression> value(const Context& context) const override { in value() 37 return Literal::MakeBool(context, /*line=*/-1, (context.fCaps.*fGetCap)()); in value() 53 std::unique_ptr<Expression> value(const Context& context) const override { in value() 54 return Literal::MakeInt(context, /*line=*/-1, (context.fCaps.*fGetCap)()); in value() 63 using Pair = std::pair<const char*, CapsLookupMethod*>; 65 CapsLookupTable(std::initializer_list<Pair> capsLookups) { in CapsLookupTable() 67 fMap[entry.first] = std::unique_ptr<CapsLookupMethod>(entry.second); in CapsLookupTable() 73 return (iter != fMap.end()) ? iter->second.get() : nullptr; in lookup() [all …]
|
| /third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/ |
| D | cord_rep_btree_reader_test.cc | 7 // https://www.apache.org/licenses/LICENSE-2.0 52 const size_t cap = CordRepBtree::kMaxCapacity; in TEST() local 53 int counts[] = {1, 2, cap, cap * cap, cap * cap + 1, cap * cap * 2 + 17}; in TEST() 56 std::string data = CreateRandomString(count * kChars); in TEST() 57 std::vector<CordRep*> flats = CreateFlatsFromString(data, kChars); in TEST() 84 const size_t cap = CordRepBtree::kMaxCapacity; in TEST() local 85 int counts[] = {1, 2, cap, cap * cap, cap * cap + 1, cap * cap * 2 + 17}; in TEST() 88 std::string data = CreateRandomString(count * kChars); in TEST() 89 std::vector<CordRep*> flats = CreateFlatsFromString(data, kChars); in TEST() 92 for (size_t skip1 = 0; skip1 < data.length() - kChars; ++skip1) { in TEST() [all …]
|
| D | resize_uninitialized.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 36 using HasMember = std::false_type; 37 static void Resize(string_type* s, size_t new_size) { s->resize(new_size); } in Resize() 43 string_type, absl::void_t<decltype(std::declval<string_type&>() 45 using HasMember = std::true_type; 47 s->__resize_default_init(new_size); 51 // Returns true if the std::string implementation supports a resize where 52 // the new characters added to the std::string are left untouched. 61 // Like str->resize(new_size), except any new characters added to "*str" as a 64 // store of the std::string with known data. [all …]
|
| /third_party/skia/m133/gm/ |
| D | quadpaths.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 36 const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, in drawPath() argument 41 paint.setStrokeCap(cap); in drawPath() 46 canvas->save(); in drawPath() 47 canvas->clipRect(clip); in drawPath() 48 canvas->drawPath(path, paint); in drawPath() 49 canvas->restore(); in drawPath() 73 SkPaint::Cap fCap; in onDraw() 90 path.fName = "moveTo-quad"; in onDraw() 98 canvas->drawString(title, 20.0f, 20.0f, font, titlePaint); in onDraw() [all …]
|
| D | cubicpaths.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 42 for (SkScalar dy = -1; dy <= 1; dy += 1) { in onDraw() 43 canvas->save(); in onDraw() 44 for (SkScalar dx = -1; dx <= 1; dx += 1) { in onDraw() 45 canvas->save(); in onDraw() 46 canvas->clipRect(bounds); in onDraw() 47 canvas->translate(dx, dy); in onDraw() 48 canvas->drawPath(path, paint); in onDraw() 49 canvas->restore(); in onDraw() 51 canvas->translate(bounds.width(), 0); in onDraw() [all …]
|
| D | linepaths.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 23 const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, in drawPath() argument 28 paint.setStrokeCap(cap); in drawPath() 33 canvas->save(); in drawPath() 34 canvas->clipRect(clip); in drawPath() 35 canvas->drawPath(path, paint); in drawPath() 36 canvas->restore(); in drawPath() 60 SkPaint::Cap fCap; in draw() 78 path.fName = "moveTo-line-close"; in draw() 80 path.fName = "moveTo-line"; in draw() [all …]
|
| D | path_stroke_with_zero_length.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 35 // Each test is drawn to a 50x20 offscreen surface, and expected to produce some number (0 - 2) of 36 // visible pieces of cap geometry. These are counted by scanning horizontally for peaks (blobs). 45 int w = surface->width(), h = surface->height(); in draw_path_cell() 51 if (!surface->readPixels(pmap, 0, 0)) { in draw_path_cell() 57 int y = (h - 1) / 2; in draw_path_cell() 62 // We drew white-on-black. We can look for any non-zero value. Just check red. in draw_path_cell() 63 // And we care if either row is non-zero, so just add them to simplify everything. in draw_path_cell() 77 result.setColor(kFailureYellow); // Yellow -- more geometry than expected in draw_path_cell() 79 result.setColor(kFailureRed); // Red -- missing some geometry in draw_path_cell() [all …]
|
| D | nonclosedpaths.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 19 // This GM tests a grab-bag of non-closed paths. All these paths look like 31 // The path looks closed, but final rendering has 2 ends with cap. 45 // Use rect-like geometry for non-closed path, for right angles make it 69 canvas->translate(x, y); in SetLocation() 74 // 0(may use hairline rendering), 10(common case for stroke-style) in onDraw() 77 int numWidths = std::size(kStrokeWidth); in onDraw() 83 constexpr SkPaint::Cap kCap[] = { in onDraw() 99 // For stroke style painter and fill-and-stroke style painter in onDraw() 101 for (size_t style = 0; style < std::size(kStyle); ++style) { in onDraw() [all …]
|
| /third_party/skia/m133/src/gpu/graphite/ |
| D | DrawParams.h | 4 * Use of this source code is governed by a BSD-style license that can be 24 // NOTE: Only represents the stroke or hairline styles; stroke-and-fill must be handled higher up. 31 SkPaint::Cap cap) in StrokeStyle() argument 32 : fHalfWidth(std::max(0.f, 0.5f * width)) in StrokeStyle() 33 , fJoinLimit(join == SkPaint::kMiter_Join ? std::max(0.f, miterLimit) : in StrokeStyle() 34 (join == SkPaint::kBevel_Join ? 0.f : -1.f)) in StrokeStyle() 35 , fCap(cap) {} in StrokeStyle() 47 float miterLimit() const { return std::max(0.f, fJoinLimit); } in miterLimit() 48 SkPaint::Cap cap() const { return fCap; } in cap() function 60 SkPaint::Cap fCap; [all …]
|
| /third_party/re2/re2/testing/ |
| D | parse_test.cc | 2 // Use of this source code is governed by a BSD-style 19 // has undefined behaviour, so now we use an internal-only flag because 43 { "a|b", "cc{0x61-0x62}" }, 44 { "(a)", "cap{lit{a}}" }, 45 { "(a)|b", "alt{cap{lit{a}}lit{b}}" }, 51 { "a{2,}", "rep{2,-1 lit{a}}" }, 57 { "a{2,}?", "nrep{2,-1 lit{a}}" }, 77 { "[abc]", "cc{0x61-0x63}" }, 78 { "[a-z]", "cc{0x61-0x7a}" }, 80 { "\\-", "lit{-}" }, [all …]
|
| /third_party/skia/src/effects/ |
| D | SkOpPathEffect.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 17 return sk_sp<SkPathEffect>(new SkOpPE(std::move(one), std::move(two), op)); in Make() 21 : fOne(std::move(one)), fTwo(std::move(two)), fOp(op) {} in SkOpPE() 27 if (!fOne->filterPath(&one, src, rec, cull, ctm)) { in onFilterPath() 34 if (!fTwo->filterPath(&two, src, rec, cull, ctm)) { in onFilterPath() 45 return (!SkToBool(fOne) || as_PEB(fOne)->computeFastBounds(nullptr)) && in computeFastBounds() 46 (!SkToBool(fTwo) || as_PEB(fTwo)->computeFastBounds(nullptr)); in computeFastBounds() 51 if (fOne && !as_PEB(fOne)->computeFastBounds(bounds)) { in computeFastBounds() 54 if (fTwo && !as_PEB(fTwo)->computeFastBounds(&b2)) { in computeFastBounds() 60 if (!bounds->intersect(b2)) { in computeFastBounds() [all …]
|
| /third_party/mesa3d/src/gallium/frontends/rusticl/mesa/pipe/ |
| D | screen.rs | 11 use std::convert::TryInto; 12 use std::ffi::CStr; 13 use std::mem::size_of; 14 use std::os::raw::c_schar; 15 use std::os::raw::c_uchar; 16 use std::os::raw::c_void; 17 use std::ptr; 18 use std::sync::Arc; 31 fn compute_param(&self, cap: pipe_compute_cap) -> T; in compute_param() 37 fn compute_param(&self, cap: pipe_compute_cap) -> $ty { [all …]
|
| /third_party/skia/m133/tests/ |
| D | EmptyPathTest.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 58 ERRORF(reporter, "%s style[%d] cap[%d] join[%d] antialias[%d]" in drawAndTest() 74 static const SkPaint::Cap gCaps[] = { in iter_paint() 89 for (size_t cap = 0; cap < std::size(gCaps); ++cap) { in iter_paint() local 90 for (size_t join = 0; join < std::size(gJoins); ++join) { in iter_paint() 91 for (size_t style = 0; style < std::size(gStyles); ++style) { in iter_paint() 92 if (drawCaps && SkPaint::kButt_Cap != gCaps[cap] in iter_paint() 100 paint.setStrokeCap(gCaps[cap]); in iter_paint() 117 static void make_M(SkPath* path) { path->moveTo(CX, CY); } in make_M() 118 static void make_MM(SkPath* path) { path->moveTo(CX, CY).moveTo(CX, CY); } in make_MM() [all …]
|
| /third_party/spirv-tools/source/opt/ |
| D | feature_manager.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 31 for (auto ext : module->extensions()) { in AddExtensions() 37 assert(ext->opcode() == spv::Op::OpExtension && in AddExtension() 40 const std::string name = ext->GetInOperand(0u).AsString(); in AddExtension() 52 void FeatureManager::AddCapability(spv::Capability cap) { in AddCapability() argument 53 if (capabilities_.contains(cap)) return; in AddCapability() 55 capabilities_.insert(cap); in AddCapability() 59 uint32_t(cap), &desc)) { in AddCapability() 61 CapabilitySet(desc->numCapabilities, desc->capabilities)) { in AddCapability() 67 void FeatureManager::RemoveCapability(spv::Capability cap) { in RemoveCapability() argument [all …]
|
| /third_party/skia/third_party/externals/angle2/src/libANGLE/capture/ |
| D | FrameCapture.cpp | 3 // Use of this source code is governed by a BSD-style license that can be 125 std::string GetDefaultOutDirectory() in GetDefaultOutDirectory() 128 std::string path = "/sdcard/Android/data/"; in GetDefaultOutDirectory() 151 path += std::string(applicationId) + kAndroidOutputSubdir; in GetDefaultOutDirectory() 155 if (stat(path.c_str(), &dir_stat) == -1) in GetDefaultOutDirectory() 163 return std::string("./"); in GetDefaultOutDirectory() 167 std::string GetCaptureTrigger() in GetCaptureTrigger() 172 std::ostream &operator<<(std::ostream &os, gl::ContextID contextId) in operator <<() 181 constexpr gl::ContextID kNoContextId = {std::numeric_limits<uint32_t>::max()}; 185 FmtCapturePrefix(gl::ContextID contextIdIn, const std::string &captureLabelIn) in FmtCapturePrefix() [all …]
|
| /third_party/skia/third_party/externals/spirv-tools/source/opt/ |
| D | feature_manager.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 33 for (auto ext : module->extensions()) { in AddExtensions() 39 assert(ext->opcode() == SpvOpExtension && in AddExtension() 42 const std::string name = in AddExtension() 43 reinterpret_cast<const char*>(ext->GetInOperand(0u).words.data()); in AddExtension() 55 void FeatureManager::AddCapability(SpvCapability cap) { in AddCapability() argument 56 if (capabilities_.Contains(cap)) return; in AddCapability() 58 capabilities_.Add(cap); in AddCapability() 62 grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { in AddCapability() 63 CapabilitySet(desc->numCapabilities, desc->capabilities) in AddCapability() [all …]
|
| /third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/ |
| D | feature_manager.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 33 for (auto ext : module->extensions()) { in AddExtensions() 39 assert(ext->opcode() == SpvOpExtension && in AddExtension() 42 const std::string name = in AddExtension() 43 reinterpret_cast<const char*>(ext->GetInOperand(0u).words.data()); in AddExtension() 55 void FeatureManager::AddCapability(SpvCapability cap) { in AddCapability() argument 56 if (capabilities_.Contains(cap)) return; in AddCapability() 58 capabilities_.Add(cap); in AddCapability() 62 grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { in AddCapability() 63 CapabilitySet(desc->numCapabilities, desc->capabilities) in AddCapability() [all …]
|
| /third_party/skia/src/gpu/ops/ |
| D | DashOp.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 47 SkVector vecSrc = pts[1] - pts[0]; in calc_dash_scaling() 69 SkVector vec = pts[1] - pts[0]; in align_to_x_axis() 77 rotMatrix->setSinCos(-vec.fY, vec.fX, pts[0].fX, pts[0].fY); in align_to_x_axis() 79 rotMatrix->mapPoints(ptsRot, pts, 2); in align_to_x_axis() 90 return srcIntervalLen - phase; in calc_start_adjustment() 101 SkScalar totalLen = pts[1].fX - pts[0].fX; in calc_end_adjustment() 104 *endingInt = totalLen - numFullIntervals * srcIntervalLen + phase; in calc_end_adjustment() 106 *endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen; in calc_end_adjustment() 111 return *endingInt - intervals[0]; in calc_end_adjustment() [all …]
|
| /third_party/skia/m133/src/gpu/ganesh/ops/ |
| D | DashOp.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 93 SkVector vecSrc = pts[1] - pts[0]; in calc_dash_scaling() 115 SkVector vec = pts[1] - pts[0]; in align_to_x_axis() 123 rotMatrix->setSinCos(-vec.fY, vec.fX, pts[0].fX, pts[0].fY); in align_to_x_axis() 125 rotMatrix->mapPoints(ptsRot, pts, 2); in align_to_x_axis() 136 return srcIntervalLen - phase; in calc_start_adjustment() 147 SkScalar totalLen = pts[1].fX - pts[0].fX; in calc_end_adjustment() 150 *endingInt = totalLen - numFullIntervals * srcIntervalLen + phase; in calc_end_adjustment() 152 *endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen; in calc_end_adjustment() 157 return *endingInt - intervals[0]; in calc_end_adjustment() [all …]
|
| /third_party/skia/tools/skiaserve/ |
| D | Request.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 45 bmp.allocPixels(canvas->imageInfo()); in writeCanvasToPng() 46 SkAssertResult(canvas->readPixels(bmp, 0, 0)); in writeCanvasToPng() 57 GLTestContext* gl = factory->getContextInfo(GrContextFactory::kGL_ContextType, in getCanvas() 60 gl = factory->getContextInfo(GrContextFactory::kGLES_ContextType, in getCanvas() 64 gl->makeCurrent(); in getCanvas() 71 this->enableGPU(fGPUEnabled); in getCanvas() 73 SkCanvas* target = fSurface->getCanvas(); in getCanvas() 78 //fDebugCanvas->setOverdrawViz(true); in drawToPng() 79 auto* canvas = this->getCanvas(); in drawToPng() [all …]
|
| /third_party/rust/rust/src/tools/clippy/lintcheck/src/ |
| D | driver.rs | 3 use std::io::{self, BufReader, Write}; 4 use std::net::TcpStream; 5 use std::process::{self, Command, Stdio}; 6 use std::{env, mem}; 10 /// 3. Otherwise sends the stderr of running `clippy-driver` to the server 11 fn run_clippy(addr: &str) -> Option<i32> { in run_clippy() 27 // Remove --cap-lints allow so that clippy runs and lints are emitted in run_clippy() 30 "--cap-lints=allow" => false, in run_clippy() 31 "--cap-lints" => { in run_clippy() 42 .expect("failed to run clippy-driver"); in run_clippy()
|
| /third_party/grpc/src/core/load_balancing/weighted_round_robin/ |
| D | static_stride_scheduler.cc | 8 // http://www.apache.org/licenses/LICENSE-2.0 34 constexpr uint16_t kMaxWeight = std::numeric_limits<uint16_t>::max(); 36 // Assuming the mean of all known weights is M, StaticStrideScheduler will cap 43 // Assuming the mean of all known weights is M, StaticStrideScheduler will cap 47 // large weights are non-accepting (and thus WeightedRoundRobin will retry 48 // picking them over and over again), and there are also channels with near-zero 51 // until it gets a single channel with near-zero weight. This was a part of what 56 // picks of non-accepting channels with high weights in such corner cases. But 58 // potentially very bad tasks (that would have near-zero weights) than zero. 69 // (http://google3/production/rpc/stubs/core/loadbalancing/weightedroundrobin.cc;l=324-325;rcl=5149… [all …]
|
| /third_party/skia/m133/src/core/ |
| D | SkStrokeRec.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 16 #define kStrokeRec_FillStyleWidth (-SK_Scalar1) 28 this->init(paint, paint.getStyle(), resScale); in SkStrokeRec() 32 this->init(paint, styleOverride, resScale); in SkStrokeRec() 94 this->setFillStyle(); in setStrokeStyle() 113 stroker.setCap((SkPaint::Cap)fCap); in applyToPath() 129 paint->setStyle(SkPaint::kFill_Style); in applyToPaint() 133 paint->setStyle(fStrokeAndFill ? SkPaint::kStrokeAndFill_Style : SkPaint::kStroke_Style); in applyToPaint() 134 paint->setStrokeWidth(fWidth); in applyToPaint() 135 paint->setStrokeMiter(fMiterLimit); in applyToPaint() [all …]
|
| /third_party/skia/src/core/ |
| D | SkStrokeRec.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 12 #define kStrokeRec_FillStyleWidth (-SK_Scalar1) 24 this->init(paint, paint.getStyle(), resScale); in SkStrokeRec() 28 this->init(paint, styleOverride, resScale); in SkStrokeRec() 90 this->setFillStyle(); in setStrokeStyle() 111 stroker.setCap((SkPaint::Cap)fCap); in applyToPath() 127 paint->setStyle(SkPaint::kFill_Style); in applyToPaint() 131 paint->setStyle(fStrokeAndFill ? SkPaint::kStrokeAndFill_Style : SkPaint::kStroke_Style); in applyToPaint() 132 paint->setStrokeWidth(fWidth); in applyToPaint() 133 paint->setStrokeMiter(fMiterLimit); in applyToPaint() [all …]
|
| /third_party/skia/third_party/externals/spirv-tools/test/val/ |
| D | val_cfg_test.cpp | 1 // Copyright (c) 2015-2016 The Khronos Group Inc. 7 // http://www.apache.org/licenses/LICENSE-2.0 43 std::string nameOps() { return ""; } in nameOps() 46 std::string nameOps(std::pair<std::string, std::string> head, Args... names) { in nameOps() 52 std::string nameOps(std::string head, Args... names) { in nameOps() 57 /// SPIR-V. This class is used in the test cases below. 59 std::string label_; 60 std::string body_; 62 std::vector<Block> successors_; 69 explicit Block(std::string label, SpvOp type = SpvOpBranch) in Block() [all …]
|