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

Side by Side Diff: ui/gfx/canvas_direct2d.cc

Issue 8359029: ui/gfx: Convert Canvas::DrawFocusRect() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas_direct2d.h ('k') | ui/gfx/canvas_skia.h » ('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) 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
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::DrawFocusRect(int x, int y, int width, int height) { 311 void CanvasDirect2D::DrawFocusRect(const gfx::Rect& rect) {
312 NOTIMPLEMENTED(); 312 NOTIMPLEMENTED();
313 } 313 }
314 314
315 void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap, 315 void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap,
316 int x, int y, int w, int h) { 316 int x, int y, int w, int h) {
317 base::win::ScopedComPtr<ID2D1Brush> brush( 317 base::win::ScopedComPtr<ID2D1Brush> brush(
318 CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP, 318 CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP,
319 D2D1_EXTEND_MODE_WRAP)); 319 D2D1_EXTEND_MODE_WRAP));
320 rt_->FillRectangle(RectToRectF(x, y, w, h), brush); 320 rt_->FillRectangle(RectToRectF(x, y, w, h), brush);
321 } 321 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // CanvasDirect2D, private: 362 // CanvasDirect2D, private:
363 363
364 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) { 364 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) {
365 if (!drawing_state_block_) 365 if (!drawing_state_block_)
366 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive()); 366 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive());
367 rt_->SaveDrawingState(drawing_state_block_.get()); 367 rt_->SaveDrawingState(drawing_state_block_.get());
368 state_.push(RenderState(layer)); 368 state_.push(RenderState(layer));
369 } 369 }
370 370
371 } // namespace gfx 371 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas_direct2d.h ('k') | ui/gfx/canvas_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698