Permalink
Browse files

Use predefined constants when possible

Now we can assume that D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT is always defined in the Windows SDK.  Hence we don't need to have our own definition anymore.

This CL is just a removal of redundant code.  No behavior change is intended.

BUG=none
TEST=none

git-svn-id: https://mozc.googlecode.com/svn/trunk@538 a6090854-d499-a067-5803-1114d4e51264
  • Loading branch information...
1 parent c373210 commit c8fdbc96ba7bb1dafd747a95b63d3ca65de85465 @yukawa yukawa committed Feb 8, 2015
Showing with 2 additions and 5 deletions.
  1. +1 −1 src/mozc_version_template.txt
  2. +1 −4 src/renderer/win32/text_renderer.cc
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=16
-BUILD=2054
+BUILD=2055
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
@@ -276,9 +276,6 @@ class GdiTextRenderer : public TextRenderer {
DISALLOW_COPY_AND_ASSIGN(GdiTextRenderer);
};
-const D2D1_DRAW_TEXT_OPTIONS kD2D1DrawTextOptions =
- static_cast<D2D1_DRAW_TEXT_OPTIONS>(4);
-
class DirectWriteTextRenderer : public TextRenderer {
public:
static DirectWriteTextRenderer *Create() {
@@ -433,7 +430,7 @@ class DirectWriteTextRenderer : public TextRenderer {
}
D2D1_DRAW_TEXT_OPTIONS option = D2D1_DRAW_TEXT_OPTIONS_NONE;
if (SystemUtil::IsWindows8_1OrLater()) {
- option |= kD2D1DrawTextOptions;
+ option |= D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT;
}
dc_render_target_->BeginDraw();
dc_render_target_->SetTransform(D2D1::Matrix3x2F::Identity());

0 comments on commit c8fdbc9

Please sign in to comment.