Skip to content

Commit

Permalink
skia: remove unused ComputeDefaultPixelGeometry() function
Browse files Browse the repository at this point in the history
Nothing in Chromium makes use of it anymore.

BUG=13714
R=thakis@chromium.org

Review-Url: https://codereview.chromium.org/2715983003
Cr-Commit-Position: refs/heads/master@{#453452}
  • Loading branch information
tfarina authored and Commit bot committed Feb 28, 2017
1 parent 2b2426c commit 7e01696
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
31 changes: 3 additions & 28 deletions skia/ext/skia_utils_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "skia/ext/skia_utils_base.h"

#include <stdint.h>

#include "skia/ext/skia_utils_base.h"
#include "third_party/skia/include/core/SkFontLCDConfig.h"
#include "base/pickle.h"

namespace skia {

Expand Down Expand Up @@ -76,30 +77,4 @@ bool WriteSkFontStyle(base::Pickle* pickle, SkFontStyle style) {
pickle->WriteUInt16(style.slant());
}

SkPixelGeometry ComputeDefaultPixelGeometry() {
SkFontLCDConfig::LCDOrder order = SkFontLCDConfig::GetSubpixelOrder();
if (SkFontLCDConfig::kNONE_LCDOrder == order) {
return kUnknown_SkPixelGeometry;
}

// Bit0 is RGB(0), BGR(1)
// Bit1 is H(0), V(1)
const SkPixelGeometry gGeo[] = {
kRGB_H_SkPixelGeometry,
kBGR_H_SkPixelGeometry,
kRGB_V_SkPixelGeometry,
kBGR_V_SkPixelGeometry,
};
int index = 0;
if (SkFontLCDConfig::kBGR_LCDOrder == order) {
index |= 1;
}
if (SkFontLCDConfig::kVertical_LCDOrientation ==
SkFontLCDConfig::GetSubpixelOrientation()) {
index |= 2;
}
return gGeo[index];
}

} // namespace skia

11 changes: 5 additions & 6 deletions skia/ext/skia_utils_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
#ifndef SKIA_EXT_SKIA_UTILS_BASE_H_
#define SKIA_EXT_SKIA_UTILS_BASE_H_

#include "base/pickle.h"
#include "third_party/skia/include/ports/SkFontConfigInterface.h"
#include "third_party/skia/include/core/SkSurfaceProps.h"

namespace base {
class Pickle;
class PickleIterator;
}

namespace skia {

Expand Down Expand Up @@ -35,10 +38,6 @@ SK_API bool WriteSkFontIdentity(
// Return true if str can be written into the request pickle.
SK_API bool WriteSkFontStyle(base::Pickle* pickle, SkFontStyle style);

// Determine the default pixel geometry (for LCD) by querying the font host
SK_API SkPixelGeometry ComputeDefaultPixelGeometry();

} // namespace skia

#endif // SKIA_EXT_SKIA_UTILS_BASE_H_

0 comments on commit 7e01696

Please sign in to comment.