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

Side by Side Diff: gfx/canvas_skia.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_skia.h ('k') | no next file » | 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_skia.h" 5 #include "gfx/canvas_skia.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void CanvasSkia::TranslateInt(int x, int y) { 99 void CanvasSkia::TranslateInt(int x, int y) {
100 translate(SkIntToScalar(x), SkIntToScalar(y)); 100 translate(SkIntToScalar(x), SkIntToScalar(y));
101 } 101 }
102 102
103 void CanvasSkia::ScaleInt(int x, int y) { 103 void CanvasSkia::ScaleInt(int x, int y) {
104 scale(SkIntToScalar(x), SkIntToScalar(y)); 104 scale(SkIntToScalar(x), SkIntToScalar(y));
105 } 105 }
106 106
107 void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) { 107 void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) {
108 FillRectInt(color, x, y, w, h, SkXfermode::kSrcOver_Mode);
109 }
110
111 void CanvasSkia::FillRectInt(const SkColor& color,
112 int x, int y, int w, int h,
113 SkXfermode::Mode mode) {
108 SkPaint paint; 114 SkPaint paint;
109 paint.setColor(color); 115 paint.setColor(color);
110 paint.setStyle(SkPaint::kFill_Style); 116 paint.setStyle(SkPaint::kFill_Style);
111 paint.setXfermodeMode(SkXfermode::kSrcOver_Mode); 117 paint.setXfermodeMode(mode);
112 DrawRectInt(x, y, w, h, paint); 118 DrawRectInt(x, y, w, h, paint);
113 } 119 }
114 120
115 void CanvasSkia::FillRectInt(const gfx::Brush* brush, 121 void CanvasSkia::FillRectInt(const gfx::Brush* brush,
116 int x, int y, int w, int h) { 122 int x, int y, int w, int h) {
117 const SkiaShader* shader = static_cast<const SkiaShader*>(brush); 123 const SkiaShader* shader = static_cast<const SkiaShader*>(brush);
118 SkPaint paint; 124 SkPaint paint;
119 paint.setShader(shader->shader()); 125 paint.setShader(shader->shader());
120 // TODO(beng): set shader transform to match canvas transform. 126 // TODO(beng): set shader transform to match canvas transform.
121 DrawRectInt(x, y, w, h, paint); 127 DrawRectInt(x, y, w, h, paint);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 382
377 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { 383 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) {
378 #if defined(OS_WIN) 384 #if defined(OS_WIN)
379 return new CanvasPaintWin(view); 385 return new CanvasPaintWin(view);
380 #else 386 #else
381 return NULL; 387 return NULL;
382 #endif 388 #endif
383 } 389 }
384 390
385 } // namespace gfx 391 } // namespace gfx
OLDNEW
« no previous file with comments | « gfx/canvas_skia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698