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

Side by Side Diff: gfx/canvas_direct2d.cc

Issue 4319003: Replace TabContentsViewGtk with TabContentsViewViews as part of the ongoing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address final comments from reviewers Created 10 years, 1 month 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 | « gfx/canvas_direct2d.h ('k') | 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) 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/brush.h"
9 #include "gfx/rect.h" 9 #include "gfx/rect.h"
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 rt_->SetTransform(transform); 202 rt_->SetTransform(transform);
203 } 203 }
204 204
205 void CanvasDirect2D::FillRectInt(const SkColor& color, 205 void CanvasDirect2D::FillRectInt(const SkColor& color,
206 int x, int y, int w, int h) { 206 int x, int y, int w, int h) {
207 ScopedComPtr<ID2D1SolidColorBrush> solid_brush; 207 ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
208 rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive()); 208 rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
209 rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush); 209 rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush);
210 } 210 }
211 211
212 void CanvasDirect2D::FillRectInt(const SkColor& color,
213 int x, int y, int w, int h,
214 SkXfermode::Mode mode) {
215 NOTIMPLEMENTED();
216 }
217
212 void CanvasDirect2D::FillRectInt(const gfx::Brush* brush, 218 void CanvasDirect2D::FillRectInt(const gfx::Brush* brush,
213 int x, int y, int w, int h) { 219 int x, int y, int w, int h) {
214 const Direct2DBrush* d2d_brush = static_cast<const Direct2DBrush*>(brush); 220 const Direct2DBrush* d2d_brush = static_cast<const Direct2DBrush*>(brush);
215 rt_->FillRectangle(RectToRectF(x, y, w, h), d2d_brush->brush()); 221 rt_->FillRectangle(RectToRectF(x, y, w, h), d2d_brush->brush());
216 } 222 }
217 223
218 void CanvasDirect2D::DrawRectInt(const SkColor& color, 224 void CanvasDirect2D::DrawRectInt(const SkColor& color,
219 int x, int y, int w, int h) { 225 int x, int y, int w, int h) {
220 ScopedComPtr<ID2D1SolidColorBrush> solid_brush; 226 ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
221 rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive()); 227 rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // CanvasDirect2D, private: 353 // CanvasDirect2D, private:
348 354
349 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) { 355 void CanvasDirect2D::SaveInternal(ID2D1Layer* layer) {
350 if (!drawing_state_block_) 356 if (!drawing_state_block_)
351 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive()); 357 GetD2D1Factory()->CreateDrawingStateBlock(drawing_state_block_.Receive());
352 rt_->SaveDrawingState(drawing_state_block_.get()); 358 rt_->SaveDrawingState(drawing_state_block_.get());
353 state_.push(RenderState(layer)); 359 state_.push(RenderState(layer));
354 } 360 }
355 361
356 } // namespace gfx 362 } // namespace gfx
OLDNEW
« no previous file with comments | « gfx/canvas_direct2d.h ('k') | gfx/canvas_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698