| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/canvas_direct2d.h" | 5 #include "ui/gfx/canvas_direct2d.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "ui/gfx/brush.h" | 8 #include "ui/gfx/brush.h" |
| 9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 301 } |
| 302 | 302 |
| 303 void CanvasDirect2D::DrawStringInt(const string16& text, | 303 void CanvasDirect2D::DrawStringInt(const string16& text, |
| 304 const gfx::Font& font, | 304 const gfx::Font& font, |
| 305 const SkColor& color, | 305 const SkColor& color, |
| 306 int x, int y, int w, int h, | 306 int x, int y, int w, int h, |
| 307 int flags) { | 307 int flags) { |
| 308 NOTIMPLEMENTED(); | 308 NOTIMPLEMENTED(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void CanvasDirect2D::DrawStringInt(const RenderText& render_text) { |
| 312 NOTIMPLEMENTED(); |
| 313 } |
| 314 |
| 311 void CanvasDirect2D::DrawFocusRect(int x, int y, int width, int height) { | 315 void CanvasDirect2D::DrawFocusRect(int x, int y, int width, int height) { |
| 312 NOTIMPLEMENTED(); | 316 NOTIMPLEMENTED(); |
| 313 } | 317 } |
| 314 | 318 |
| 315 void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap, | 319 void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap, |
| 316 int x, int y, int w, int h) { | 320 int x, int y, int w, int h) { |
| 317 base::win::ScopedComPtr<ID2D1Brush> brush( | 321 base::win::ScopedComPtr<ID2D1Brush> brush( |
| 318 CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP, | 322 CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP, |
| 319 D2D1_EXTEND_MODE_WRAP)); | 323 D2D1_EXTEND_MODE_WRAP)); |
| 320 rt_->FillRectangle(RectToRectF(x, y, w, h), brush); | 324 rt_->FillRectangle(RectToRectF(x, y, w, h), brush); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 // CanvasDirect2D, private: | 366 // CanvasDirect2D, private: |
| 363 | 367 |
| 364 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) { | 368 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) { |
| 365 if (!drawing_state_block_) | 369 if (!drawing_state_block_) |
| 366 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive()); | 370 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive()); |
| 367 rt_->SaveDrawingState(drawing_state_block_.get()); | 371 rt_->SaveDrawingState(drawing_state_block_.get()); |
| 368 state_.push(RenderState(layer)); | 372 state_.push(RenderState(layer)); |
| 369 } | 373 } |
| 370 | 374 |
| 371 } // namespace gfx | 375 } // namespace gfx |
| OLD | NEW |