Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: cc/font_atlas.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 165444 Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/font_atlas.cc
diff --git a/cc/font_atlas.cc b/cc/font_atlas.cc
index 2d157663b22005047e8bd872bf98cd818dd81eaa..2f18e02043dc35545abf074a53e333ba5a7a36b6 100644
--- a/cc/font_atlas.cc
+++ b/cc/font_atlas.cc
@@ -28,7 +28,7 @@ FontAtlas::~FontAtlas()
void FontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const std::string& text, const gfx::Point& destPosition, const gfx::Size& clip) const
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
std::vector<std::string> lines;
base::SplitString(text, '\n', &lines);
@@ -44,7 +44,7 @@ void FontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const std::stri
void FontAtlas::drawOneLineOfTextInternal(SkCanvas* canvas, const SkPaint& paint, const std::string& textLine, const gfx::Point& destPosition) const
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
gfx::Point position = destPosition;
for (unsigned i = 0; i < textLine.length(); ++i) {
@@ -59,7 +59,7 @@ void FontAtlas::drawOneLineOfTextInternal(SkCanvas* canvas, const SkPaint& paint
void FontAtlas::drawDebugAtlas(SkCanvas* canvas, const gfx::Point& destPosition) const
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
SkIRect source = SkIRect::MakeWH(m_atlas.width(), m_atlas.height());
canvas->drawBitmapRect(m_atlas, &source, SkRect::MakeXYWH(destPosition.x(), destPosition.y(), m_atlas.width(), m_atlas.height()));
« no previous file with comments | « cc/font_atlas.h ('k') | cc/frame_rate_counter.h » ('j') | cc/frame_rate_counter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698