Delete ThreadChecker from FontAtlas.
This object is created on the main thread and used on the impl thread. BUG=160312 Review URL: https://chromiumcodereview.appspot.com/11360178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167057 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/string_split.h"
|
||||
#include "cc/proxy.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
namespace cc {
|
||||
@ -28,8 +27,6 @@ FontAtlas::~FontAtlas()
|
||||
|
||||
void FontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const std::string& text, const gfx::Point& destPosition, const gfx::Size& clip) const
|
||||
{
|
||||
DCHECK(m_threadChecker.CalledOnValidThread());
|
||||
|
||||
std::vector<std::string> lines;
|
||||
base::SplitString(text, '\n', &lines);
|
||||
|
||||
@ -44,8 +41,6 @@ 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(m_threadChecker.CalledOnValidThread());
|
||||
|
||||
gfx::Point position = destPosition;
|
||||
for (unsigned i = 0; i < textLine.length(); ++i) {
|
||||
// If the ASCII code is out of bounds, then index 0 is used, which is just a plain rectangle glyph.
|
||||
@ -78,8 +73,6 @@ gfx::Size FontAtlas::textSize(const std::string& text)
|
||||
|
||||
void FontAtlas::drawDebugAtlas(SkCanvas* canvas, const gfx::Point& destPosition) const
|
||||
{
|
||||
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()));
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "cc/cc_export.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "ui/gfx/rect.h"
|
||||
@ -62,8 +61,6 @@ private:
|
||||
|
||||
int m_fontHeight;
|
||||
|
||||
base::ThreadChecker m_threadChecker;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FontAtlas);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user