• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LTIMING函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LTIMING函数的典型用法代码示例。如果您正苦于以下问题:C++ LTIMING函数的具体用法?C++ LTIMING怎么用?C++ LTIMING使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LTIMING函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: FTFace

FT_Face FTFace(Font fnt)
{
	LTIMING("FTFace");
	LLOG("FTFace " << fnt);
	ONCELOCK {
		ClearFtFaceCache();
	}
	FtFaceEntry be;
	be = ft_cache[0];
	for(int i = 0; i < FONTCACHE; i++) {
		FtFaceEntry e = ft_cache[i];
		if(i)
			ft_cache[i] = be;
		if(e.font == fnt && e.face) {
			if(i)
				ft_cache[0] = e;
			LLOG("Found " << e.face);
			return e.face;
		}
		be = e;
	}
	LTIMING("FTFace2");
	if(be.face) {
		LLOG("Removing " << be.font << " - " << (void *)be.face);
		FT_Done_Face(be.face);
	}
	be.font = fnt;
	be.face = CreateFTFace(be.font);
	ft_cache[0] = be;
	LLOG("Created " << be.face);
	return be.face;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:32,代码来源:FT_fontsys.cpp


示例2: LTIMING

void Ctrl::RefreshFrame(const Rect& r) {
	GuiLock __;
	if(!IsOpen() || !IsVisible() || r.IsEmpty()) return;
	LTIMING("RefreshFrame");
	LLOG("RefreshRect " << Name() << ' ' << r);
#ifdef PLATFORM_WIN32
	if(isdhctrl) {
		InvalidateRect(((DHCtrl *)this)->GetHWND(), r, false);
		return;
	}
#endif
	if(!top) {
		if(InFrame())
			parent->RefreshFrame(r + GetRect().TopLeft());
		else
			parent->Refresh(r + GetRect().TopLeft());
	}
	else {
		LLOG("WndInvalidateRect: " << r << ' ' << Name());
		LTIMING("RefreshFrame InvalidateRect");
		WndInvalidateRect(r);
#ifdef PLATFORM_WIN32
		LLOG("UpdateRect: " << GetWndUpdateRect() << ' ' << Name());
#endif
	}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:26,代码来源:CtrlDraw.cpp


示例3: GetWin32Font

HFONT GetWin32Font(Font fnt, int angle)
{
	LTIMING("GetWin32Font");
	static HFontEntry cache[FONTCACHE];
	ONCELOCK {
		for(int i = 0; i < FONTCACHE; i++)
			cache[i].font.Height(-30000);
	}
	HFontEntry be;
	be = cache[0];
	for(int i = 0; i < FONTCACHE; i++) {
		HFontEntry e = cache[i];
		if(i)
			cache[i] = be;
		if(e.font == fnt && e.angle == angle) {
			if(i)
				cache[0] = e;
			return e.hfont;
		}
		be = e;
	}
	LTIMING("GetWin32Font2");
	if(be.hfont)
		DeleteObject(be.hfont);

	be.font = fnt;
	be.angle = angle;
#ifdef PLATFORM_WINCE
	LOGFONT lfnt;
	Zero(lfnt);
	lfnt.lfHeight = fnt.GetHeight() ? -abs(fnt.GetHeight()) : -12;
	lfnt.lfWeight = fnt.IsBold() ? FW_BOLD : FW_NORMAL;
	lfnt.lfItalic = fnt.IsItalic();
	lfnt.lfUnderline = fnt.IsUnderline();
	lfnt.lfStrikeOut = fnt.IsStrikeout();
	wcscpy(lfnt.lfFaceName, ToSystemCharset(fnt.GetFaceName()));
	be.hfont = CreateFontIndirect(&lfnt);
#else
	be.hfont = CreateFont(
		fnt.GetHeight() ? -abs(fnt.GetHeight()) : -12,
		fnt.GetWidth(), angle, angle, fnt.IsBold() ? FW_BOLD : FW_NORMAL,
		fnt.IsItalic(), fnt.IsUnderline(), fnt.IsStrikeout(),
		fnt.GetFace() == Font::SYMBOL ? SYMBOL_CHARSET : DEFAULT_CHARSET,
		fnt.IsTrueTypeOnly() ? OUT_TT_ONLY_PRECIS : OUT_DEFAULT_PRECIS,
		CLIP_DEFAULT_PRECIS,
		fnt.IsNonAntiAliased() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY,
		DEFAULT_PITCH|FF_DONTCARE,
		fnt.GetFaceName()
	);
#endif
	cache[0] = be;
	return be.hfont;
}
开发者ID:koz4k,项目名称:soccer,代码行数:53,代码来源:FontWin32.cpp


示例4: DoQualify

bool DoQualify(ScopeInfo& nf, const String& type, const String& usings, String& qt)
{
	LTIMING("Qualify");
	int q = nf.cache.Find(type);
	if(q >= 0) {
		qt = nf.cache[q];
		return true;
	}
	LTIMING("Qualify0");
	if(!Qualify0(nf, type, usings, qt))
		return false;
	nf.cache.Add(type, qt);
	return true;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:14,代码来源:Qualify.cpp


示例5: GetIncludePath

String GetIncludePath(const String& s, const String& filedir)
{
	LTIMING("GetIncludePath");
	String key;
	key << s << "#" << filedir;
	int q = sIncludePath.Find(key);
	if(q >= 0)
		return sIncludePath[q];
	LTIMING("GetIncludePath 2");
	String p = GetIncludePath0(s, filedir);
	sIncludePath.Add(key, p);
	LLOG("GetIncludePath " << s << " " << filedir << ": " << p);
	return p;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:14,代码来源:ppfile.cpp


示例6: LTIMING

Value Compiler::ExeLink::Eval(ExeContext& x) const
{
	LTIMING("ExeLink");
	Vector<Value> v;
	v.SetCount(arg.GetCount());
	for(int i = 0; i < arg.GetCount(); i++) {
		LTIMING("arg eval");
		v[i] = arg[i]->Eval(x);
	}
	StringBuffer r;
	r << "\"";
	MakeLink(r, *part, v);
	r << "\"";
	return Raw(r);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:15,代码来源:Exe.cpp


示例7: White

void SDraw::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink, int n, const int *dx)
{
	sMakeTextGlyph g;
	g.font = font;
	g.color = White();
	g.angle = angle;
	g.draw = this;
	for(int i = 0; i < n; i++) {
		g.chr = text[i];
		LTIMING("Paint glyph");
		if(font.GetHeight() > 200) {
			int bn = font[g.chr] + font.GetLineHeight();
			for(g.yy = 0; g.yy < bn; g.yy += 32) {
				Image m;
				if(paintonly)
					m = MakeImagePaintOnly(g);
				else
					m = MakeImage(g);
				Point h = m.GetHotSpot();
				SysDrawImageOp(x - h.x, y + g.yy - h.y, m, m.GetSize(), ink);
			}
		}
		else {
			g.yy = Null;
			Image m;
			if(paintonly)
				m = MakeImagePaintOnly(g);
			else
				m = MakeImage(g);
			Point h = m.GetHotSpot();
			SysDrawImageOp(x - h.x, y - h.y, m, m.GetSize(), ink);
		}
		x += dx ? *dx++ : font[g.chr];
	}
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:35,代码来源:SDrawText.cpp


示例8: Begin

bool SystemDraw::ClipOp(const Rect& r)
{
    GuiLock __;
    Begin();
    LTIMING("Clip");
    return IntersectClip(r);
}
开发者ID:pedia,项目名称:raidget,代码行数:7,代码来源:DrawOpWin32.cpp


示例9: LLOG

void  Ctrl::ScrollView(const Rect& _r, int dx, int dy)
{
	GuiLock __;
	LLOG("ScrollView " << _r << " " << dx << " " << dy);
	if(IsFullRefresh() || !IsVisible())
		return;
	Size vsz = GetSize();
	dx = sgn(dx) * min(abs(dx), vsz.cx);
	dy = sgn(dy) * min(abs(dy), vsz.cy);
	Rect r = _r & vsz;
	LLOG("ScrollView2 " << r << " " << dx << " " << dy);
	Ctrl *w;
	for(w = this; w->parent; w = w->parent)
		if(w->InFrame()) {
			Refresh();
			return;
		}
	if(!w || !w->top) return;
	Rect view = InFrame() ? GetView() : GetClippedView();
	Rect sr = (r + view.TopLeft()) & view;
	sr += GetScreenRect().TopLeft() - w->GetScreenRect().TopLeft();
	if(w->AddScroll(sr, dx, dy))
		Refresh();
	else {
		LTIMING("ScrollCtrls1");
		Top *top = GetTopCtrl()->top;
		for(Ctrl *q = GetFirstChild(); q; q = q->GetNext())
			if(q->InView())
				ScrollCtrl(top, q, r, q->GetRect(), dx, dy);
		if(parent)
			for(Ctrl *q = parent->GetFirstChild(); q; q = q->GetNext())
				if(q->InView() && q != this)
					ScrollCtrl(top, q, r, q->GetScreenRect() - GetScreenView().TopLeft(), dx, dy);
	}
}
开发者ID:pedia,项目名称:raidget,代码行数:35,代码来源:CtrlDraw.cpp


示例10: IncludesFile

bool   IncludesFile(const String& parent_path, const String& header_path)
{
	LTIMING("IncludesFile");
	int pi = sSrcFile.Find(parent_path);
	int i = sSrcFile.Find(header_path);
	return pi >= 0 && i >= 0 && sIncludes.Find(MAKEQWORD(pi, i)) >= 0;
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:7,代码来源:srcfiles.cpp


示例11: White

void SDraw::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink, int n, const int *dx)
{
	sMakeTextGlyph g;
	g.font = font;
	g.color = White();
	g.angle = angle;
	g.draw = this;
	for(int i = 0; i < n; i++) {
		g.chr = text[i];
		LTIMING("Paint glyph");
		if(font.GetHeight() > 200) {
			Point at(font[g.chr], font.GetLineHeight());
			int n = at.x + at.y;
			Size bandsz(2 * n, 32);
			for(int yy = 0; yy < n; yy += bandsz.cy) {
				Image m = RenderGlyph(Point(0, -yy), angle, g.chr, font, White(), bandsz);
				SysDrawImageOp(x, y + yy, m, m.GetSize(), ink);
			}
		}
		else {
			Image m = MakeImage(g);
			Point h = m.GetHotSpot();
			SysDrawImageOp(x - h.x, y - h.y, m, m.GetSize(), ink);
		}
		x += dx ? *dx++ : font[g.chr];
	}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:27,代码来源:SDrawText.cpp


示例12: GetIncludePath0

String GetIncludePath0(const char *s, const char *filedir)
{
	LTIMING("GetIncludePath0");
	while(IsSpace(*s))
		s++;
	int type = *s;
	if(type == '<' || type == '\"' || type == '?') {
		s++;
		String name;
		if(type == '<') type = '>';
		while(*s != '\r' && *s != '\n') {
			if(*s == type) {
				if(type == '\"') {
					String fn = NormalizeSourcePath(name, filedir);
					if(FileExists(fn))
						return fn;
				}
				String p = GetFileOnPath(name, GetIncludePath(), false);
				if(p.GetCount())
					return NormalizeSourcePath(p);
				return Null;
			}
			name.Cat(*s++);
		}
	}
	return Null;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:27,代码来源:ppfile.cpp


示例13: LTIMING

void Navigator::Scope()
{
	LTIMING("FINALIZE");
	litem.Clear();
	nest_item.Clear();
	linefo.Clear();
	bool all = scope.GetCursor() <= 0;
	String sc = scope.GetKey();
	for(int i = 0; i < gitem.GetCount(); i++) {
		String grp = gitem.GetKey(i);
		int    kind = KIND_NEST;
		if(*grp == '\xff')
			kind = KIND_FILE;
		if(all) {
			NavItem& m = nest_item.Add();
			m.kind = kind;
			m.type = FormatNest(grp);
			litem.Add(&m);
		}
		else
		if(grp != sc)
			continue;
		const Vector<NavItem *>& ia = gitem[i];
		for(int i = 0; i < ia.GetCount(); i++) {
			NavItem *m = ia[i];
			for(int j = 0; j < m->linefo.GetCount(); j++)
				linefo.GetAdd(m->linefo[j].file).Add(m->linefo[j].line, litem.GetCount());
			litem.Add(m);
		}
	}
	list.Clear();
	list.SetVirtualCount(litem.GetCount());
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:33,代码来源:Navigator.cpp


示例14: SyncTopicFile

void SyncTopicFile(const RichText& text, const String& link, const String& path, const String& title)
{
	LLOG("Scanning topic " << link);
	LTIMING("Scanning topic");
	
	ClearLinkRef(link);
	
	ScanTopicIterator sti;
	sti.link = link;
	text.Iterate(sti);
	
	TopicInfo& ti = topic_info().GetPut(link);
	ti.title = title;
	ti.path = path;
	ti.time = FileGetTime(path);
	ti.words = sti.words.PickKeys();
	
	FileOut out(TopicCacheName(path));
	out << tdx_version << "\n";
	out << title << '\n';
	for(int i = 0; i < sti.ref.GetCount(); i++)
		out << sti.ref[i] << '\n';
	out << '\n';
	const Index<String>& ws = TopicWords();
	for(int i = 0; i < ti.words.GetCount(); i++)
		out << ws[ti.words[i]] << '\n';
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:27,代码来源:TopicBase.cpp


示例15: LTIMING

void sOptimizedRectRenderer::Flush()
{
	LTIMING("RectFlush");
	if(!IsNull(cr)) {
		w.DrawRect(cr, color);
		cr = Null;
	}
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:8,代码来源:LineEdit.cpp


示例16: Render

String Render(const One<Exe>& exe, Renderer *r, Vector<Value>& var)
{
	LTIMING("Render0");
	ExeContext x(var, r);
	Value v = exe->Eval(x);
	x.out.Cat(AsString(v));
	return x.out;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:8,代码来源:Exe.cpp


示例17: LTIMING

void GLDraw::PutImage(Point p, const Image& img, const Rect& src)
{
	LTIMING("PutImage");
	FlushPutRect();

	gl_image.Use();

	Size isz = img.GetSize();
	Rect s = src & isz;
	Rect r(p, s.GetSize());
	
	PutImagePixels += isz.cx * isz.cy;

	GLshort vertex[] = {
	    r.left, r.top,
	    r.left, r.bottom,
	    r.right, r.bottom,
	    r.right, r.top,
	};

	static GLushort indices[] = { 0, 1, 2, 0, 2, 3 };

	const float *tc;

	if(src == isz) {
		static float fixed[] = {
			0.0, 0.0,
			0.0, 1.0,
			1.0, 1.0,
			1.0, 0.0,
		};
		tc = fixed;
	}
	else {
		Sizef iszf = isz;
		Rectf h;
		h.left = s.left / iszf.cx;
		h.right = s.right / iszf.cx;
		h.top = s.top / iszf.cy;
		h.bottom = s.bottom / iszf.cy;
		float partial[] = {
			(float)h.left, (float)h.top,
			(float)h.left, (float)h.bottom,
			(float)h.right, (float)h.bottom,
			(float)h.right, (float)h.top,
		};
		tc = partial;
	}

	glEnableVertexAttribArray(ATTRIB_TEXPOS);
	glVertexAttribPointer(ATTRIB_TEXPOS, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(GLfloat), tc);
	glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_SHORT, GL_FALSE, 2 * sizeof(GLshort), vertex);
	glBindTexture(GL_TEXTURE_2D, GetTextureForImage(img));

	glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);

	glDisableVertexAttribArray(ATTRIB_TEXPOS);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:58,代码来源:GLDrawS.cpp


示例18: QualifyIds

String QualifyIds(ScopeInfo& nf, const String& k, const String& usings, bool all)
{
	LTIMING("QualifyIds");
	String r;
	const char *s = k;
	Vector<String> empty;
	while(*s) {
		int c = *s;
		if(c == ':') {
			const char *b = s++;
			while(*s == ':' || iscid(*s)) s++;
/*			if(all) {
				if(iscid(*r.Last()))
					r << ' ';
				ScopeInfo nnf(nf.GetScope(), nf.base);
				Qualify(r, nnf, b, s, usings);
			}
			else*/
				r.Cat(b, s);
		}
		else
		if(iscid(c)) {
			if(iscid(*r.Last()))
				r << ' ';
			if(s[0] == 'c' && s[1] == 'o' && s[2] == 'n' && s[3] == 's' && s[4] == 't' && !iscid(s[5])) {
				r << s_const;
				s += 5;
			}
			else
			if(s[0] == 'm' && s[1] == 'u' && s[2] == 't' && s[3] == 'a' && s[4] == 'b' && s[5] == 'l' && s[6] == 'e' && !iscid(s[7])) {
				r << "mutable";
				s += 7;
			}
			else
			if(s[0] == 'v' && s[1] == 'o' && s[2] == 'l' && s[3] == 'a' && s[4] == 't' && s[5] == 'i' && s[6] == 'l' && s[7] == 'e' && !iscid(s[8])) {
				r << "volatile";
				s += 8;
			}
			else {
				const char *b = s++;
				while(*s == ':' || iscid(*s)) s++;
				if(all)
					Qualify(r, nf, b, s, usings);
				else
					r.Cat(b, s);
			}
		}
		else {
			if(c == '(')
				all = true;
			if(c != ' ')
				r.Cat(c);
			s++;
		}
	}
	return r;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:57,代码来源:Qualify.cpp


示例19: NormalizeSourcePath

String NormalizeSourcePath(const String& path, const String& currdir)
{
	LTIMING("NormalizeSourcePath");
#ifdef PLATFORM_WIN32
	return ToLower(NormalizePath(path, currdir));
#else
	return NormalizePath(path, currdir);
#endif
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:9,代码来源:srcfiles.cpp


示例20: LTIMING

void Ctrl::SyncMousePos()
{
	GuiLock __;
	LTIMING("XQueryPointer");
	int x, y, xx, yy;
	Window dm1, dm2;
	Ctrl::mousePos = Null;
	if(XQueryPointer(Xdisplay, Xroot, &dm1, &dm2, &x, &y, &xx, &yy, &sKbdState))
		Ctrl::mousePos = Point(x, y);
}
开发者ID:koz4k,项目名称:soccer,代码行数:10,代码来源:X11Proc.cpp



注:本文中的LTIMING函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LTKReturnError函数代码示例发布时间:2022-05-30
下一篇:
C++ LTFAT_NAME函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap