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

Side by Side Diff: gfx/canvas_direct2d.cc

Issue 3034039: FBTF: Minor gfx/ header cleanup. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: win fix Created 10 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « gfx/canvas.h ('k') | gfx/canvas_direct2d_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gfx/canvas_direct2d.h" 5 #include "gfx/canvas_direct2d.h"
6 6
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "gfx/brush.h"
8 #include "gfx/rect.h" 9 #include "gfx/rect.h"
9 10
10 namespace { 11 namespace {
11 12
12 // Converts a SkColor to a ColorF. 13 // Converts a SkColor to a ColorF.
13 D2D1_COLOR_F SkColorToColorF(SkColor color) { 14 D2D1_COLOR_F SkColorToColorF(SkColor color) {
14 return D2D1::ColorF(static_cast<float>(SkColorGetR(color)) / 0xFF, 15 return D2D1::ColorF(static_cast<float>(SkColorGetR(color)) / 0xFF,
15 static_cast<float>(SkColorGetG(color)) / 0xFF, 16 static_cast<float>(SkColorGetG(color)) / 0xFF,
16 static_cast<float>(SkColorGetB(color)) / 0xFF, 17 static_cast<float>(SkColorGetB(color)) / 0xFF,
17 static_cast<float>(SkColorGetA(color)) / 0xFF); 18 static_cast<float>(SkColorGetA(color)) / 0xFF);
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // CanvasDirect2D, private: 438 // CanvasDirect2D, private:
438 439
439 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) { 440 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) {
440 if (!drawing_state_block_) 441 if (!drawing_state_block_)
441 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive()); 442 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive());
442 rt_->SaveDrawingState(drawing_state_block_.get()); 443 rt_->SaveDrawingState(drawing_state_block_.get());
443 state_.push(RenderState(layer)); 444 state_.push(RenderState(layer));
444 } 445 }
445 446
446 } // namespace gfx 447 } // namespace gfx
OLDNEW
« no previous file with comments | « gfx/canvas.h ('k') | gfx/canvas_direct2d_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698