Skip to content

Commit

Permalink
Use predefined constants when possible
Browse files Browse the repository at this point in the history
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
yukawa committed Feb 8, 2015
1 parent c373210 commit c8fdbc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 1 addition & 4 deletions src/renderer/win32/text_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit c8fdbc9

Please sign in to comment.