| /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/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/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/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/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/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/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/skia/third_party/externals/swiftshader/third_party/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 …]
|
| /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 …]
|
| /third_party/glslang/SPIRV/ |
| D | SpvPostProcess.cpp | 36 // Post-processing for SPIR-V IR, in internal form, not standard binary form. 50 #include "GLSL.std.450.h" 72 // Do opcode-specific checks in postProcessType() 120 // Look for any 8/16-bit storage capabilities. If there are none, assume that in postProcessType() 125 spv::Capability cap = *it; in postProcessType() local 126 if (cap == spv::CapabilityStorageInputOutput16 || in postProcessType() 127 cap == spv::CapabilityStoragePushConstant16 || in postProcessType() 128 cap == spv::CapabilityStorageUniformBufferBlock16 || in postProcessType() 129 cap == spv::CapabilityStorageUniform16) { in postProcessType() 144 spv::Capability cap = *it; in postProcessType() local [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/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 41 std::string nameOps() { return ""; } in nameOps() 44 std::string nameOps(std::pair<std::string, std::string> head, Args... names) { in nameOps() 50 std::string nameOps(std::string head, Args... names) { in nameOps() 55 /// SPIR-V. This class is used in the test cases below. 57 std::string label_; 58 std::string body_; 60 std::vector<Block> successors_; 67 explicit Block(std::string label, spv::Op type = spv::Op::OpBranch) in Block() [all …]
|
| D | val_extension_spv_khr_subgroup_rotate_test.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 30 std::vector<std::string> caps; 32 std::string result_type; 33 std::string scope; 34 std::string delta; 35 std::string cluster_size; 36 std::string expected_error; // empty for no error. 39 inline std::ostream& operator<<(std::ostream& out, Case c) { in operator <<() 41 for (auto& cap : c.caps) { in operator <<() local 42 out << cap; in operator <<() [all …]
|
| /third_party/mindspore/mindspore-src/source/mindspore/lite/src/litert/ |
| D | cpu_info.cc | 8 * http://www.apache.org/licenses/LICENSE-2.0 68 uint32_t CpuInfo::StringToDigit(const std::string &str) { in StringToDigit() 82 digit = tmp_char - '0'; in StringToDigit() 83 } else if ((uint32_t)(tmp_char - 'A') < 6) { in StringToDigit() 84 digit = base_10 + (tmp_char - 'A'); in StringToDigit() 85 } else if ((uint32_t)(tmp_char - 'a') < 6) { in StringToDigit() 86 digit = base_10 + (tmp_char - 'a'); in StringToDigit() 95 uint32_t CpuInfo::ParseArmCpuPart(const std::string &cpu_part) { in ParseArmCpuPart() 106 uint32_t CpuInfo::ParseArmCpuImplementer(const std::string &str) { in ParseArmCpuImplementer() 120 std::ifstream infile("/proc/cpuinfo", std::ios::in); in GetArmProcCpuInfo() [all …]
|
| /third_party/skia/src/pdf/ |
| D | SkPDFGraphicState.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 24 static int to_stroke_cap(uint8_t cap) { in to_stroke_cap() argument 25 // PDF32000.book section 8.4.3.3 "Line Cap Style" in to_stroke_cap() 26 switch ((SkPaint::Cap)cap) { in to_stroke_cap() 63 auto& fillMap = doc->fFillGSMap; in GetGraphicStateForPaint() 71 SkPDFIndirectReference ref = doc->emit(state); in GetGraphicStateForPaint() 83 auto& sMap = doc->fStrokeGSMap; in GetGraphicStateForPaint() 97 SkPDFIndirectReference ref = doc->emit(state); in GetGraphicStateForPaint() 112 std::unique_ptr<SkPDFDict> dict = SkPDFMakeDict(); in make_invert_function() 113 dict->insertInt("FunctionType", 4); in make_invert_function() [all …]
|
| /third_party/backends/backend/genesys/ |
| D | genesys.h | 1 /* sane - Scanner Access Now Easy. 3 Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de> 4 Copyright (C) 2005-2013 Stephane Voltz <stef.dev@free.fr> 45 #define ENABLE(OPTION) s->opt[OPTION].cap &= ~SANE_CAP_INACTIVE 46 #define DISABLE(OPTION) s->opt[OPTION].cap |= SANE_CAP_INACTIVE 47 #define IS_ACTIVE(OPTION) (((s->opt[OPTION].cap) & SANE_CAP_INACTIVE) == 0) 75 OPT_TL_X, /* top-left x */ 76 OPT_TL_Y, /* top-left y */ 77 OPT_BR_X, /* bottom-right x */ 78 OPT_BR_Y, /* bottom-right y */ [all …]
|
| D | genesys.cpp | 1 /* sane - Scanner Access Now Easy. 3 Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de> 5 Copyright (C) 2004-2016 Stéphane Voltz <stef.dev@free.fr> 6 Copyright (C) 2005-2009 Pierre Willenbrock <pierre@pirsoft.dnsalias.org> 73 std::string name; 77 StaticInit<std::list<Genesys_Scanner>> s_scanners; 78 StaticInit<std::vector<SANE_Device>> s_sane_devices; 79 StaticInit<std::vector<SANE_Device_Data>> s_sane_devices_data; 80 StaticInit<std::vector<SANE_Device*>> s_sane_devices_ptrs; 81 StaticInit<std::list<Genesys_Device>> s_devices; [all …]
|
| /third_party/skia/experimental/graphite/src/ |
| D | DrawList.h | 4 * Use of this source code is governed by a BSD-style license that can be 33 // back to Device when the command is recorded (similar to SkPaint -> GrPaint), and then 37 // assumed to be anti-aliased. 59 // NOTE: Only represents the stroke or hairline styles; stroke-and-fill must be handled higher up. 66 SkPaint::Cap cap) in StrokeParams() argument 67 : fHalfWidth(std::max(0.f, 0.5f * width)) in StrokeParams() 68 , fJoinLimit(join == SkPaint::kMiter_Join ? std::max(0.f, miterLimit) : in StrokeParams() 69 (join == SkPaint::kBevel_Join ? 0.f : -1.f)) in StrokeParams() 70 , fCap(cap) {} in StrokeParams() 82 float miterLimit() const { return std::max(0.f, fJoinLimit); } in miterLimit() [all …]
|
| /third_party/skia/src/gpu/ |
| D | GrStyle.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 19 return -1; in KeySize() 27 // One for res scale, one for style/cap/join, one for miter limit, and one for width. in KeySize() 68 kCapBits = 32 - kStyleBits - kJoinBits, in WriteKey() 76 // The cap type only matters for unclosed shapes. However, a path effect could unclose in WriteKey() 78 SkPaint::Cap cap = SkPaint::kDefault_Cap; in WriteKey() local 80 cap = style.strokeRec().getCap(); in WriteKey() 82 SkScalar miter = -1.f; in WriteKey() 96 cap << kCapShift; in WriteKey() 114 if (SkPathEffect::kDash_DashType == pe->asADash(&info)) { in initPathEffect() [all …]
|
| /third_party/mindspore/mindspore-src/source/tests/ut/cpp/dataset/ |
| D | center_crop_op_test.cc | 2 * Copyright 2019-2022 Huawei Technologies Co., Ltd 8 * http://www.apache.org/licenses/LICENSE-2.0 34 std::shared_ptr<Tensor> output_tensor; in TEST_F() 37 auto op = std::make_unique<CenterCropOp>(het, wid); in TEST_F() 38 EXPECT_TRUE(op->OneToOne()); in TEST_F() 39 Status s = op->Compute(input_tensor_, &output_tensor); in TEST_F() 41 EXPECT_EQ(het, output_tensor->shape()[0]); in TEST_F() 42 EXPECT_EQ(wid, output_tensor->shape()[1]); in TEST_F() 43 std::shared_ptr<CVTensor> p = CVTensor::AsCVTensor(output_tensor); in TEST_F() 47 /// Description: Test CenterCrop op where cap valid crop size at 10 times the input size [all …]
|
| /third_party/skia/experimental/skrive/src/ |
| D | Paint.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 23 node->setOpacity(sr->readFloat("opacity")); in parse_node() 29 if (node->style() == SkPaint::kFill_Style) { in parse_fill_stroke() 34 node->setFillRule(gFillTypeMap[std::min<size_t>(sr->readUInt8("fillRule"), in parse_fill_stroke() 35 SK_ARRAY_COUNT(gFillTypeMap) - 1)]); in parse_fill_stroke() 37 node->setStrokeWidth(sr->readFloat("width")); in parse_fill_stroke() 39 static constexpr SkPaint::Cap gCapMap[] = { in parse_fill_stroke() 44 node->setStrokeCap(gCapMap[std::min<size_t>(sr->readUInt8("cap"), in parse_fill_stroke() 45 SK_ARRAY_COUNT(gCapMap) - 1)]); in parse_fill_stroke() 52 node->setStrokeJoin(gJoinMap[std::min<size_t>(sr->readUInt8("join"), in parse_fill_stroke() [all …]
|
| /third_party/rust/crates/rustix/src/ |
| D | lib.rs | 1 //! `rustix` provides efficient memory-safe and [I/O-safe] wrappers to 2 //! POSIX-like, Unix-like, Linux, and Winsock2 syscall-like APIs, with 9 //! # fn read(sock: std::net::TcpStream, buf: &mut [u8]) -> std::io::Result<()> { 21 //! # fn read(sock: std::net::TcpStream, buf: &mut [u8]) -> std::io::Result<()> { 22 //! # use std::convert::TryInto; 24 //! # use std::os::unix::io::AsRawFd; 26 //! # use std::os::wasi::io::AsRawFd; 30 //! # use std::os::windows::io::AsRawSocket; 43 //! -1 => return Err(std::io::Error::last_os_error()), 53 //! - Error values are translated to [`Result`]s. [all …]
|