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_skia.h" | 5 #include "ui/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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // need to unref after paint takes ownership of the shader. | 317 // need to unref after paint takes ownership of the shader. |
318 shader->unref(); | 318 shader->unref(); |
319 save(); | 319 save(); |
320 translate(SkIntToScalar(dest_x - src_x), SkIntToScalar(dest_y - src_y)); | 320 translate(SkIntToScalar(dest_x - src_x), SkIntToScalar(dest_y - src_y)); |
321 ClipRectInt(src_x, src_y, w, h); | 321 ClipRectInt(src_x, src_y, w, h); |
322 drawPaint(paint); | 322 drawPaint(paint); |
323 restore(); | 323 restore(); |
324 } | 324 } |
325 | 325 |
326 gfx::NativeDrawingContext CanvasSkia::BeginPlatformPaint() { | 326 gfx::NativeDrawingContext CanvasSkia::BeginPlatformPaint() { |
327 return beginPlatformPaint(); | 327 return skia::BeginPlatformPaint(this); |
328 } | 328 } |
329 | 329 |
330 void CanvasSkia::EndPlatformPaint() { | 330 void CanvasSkia::EndPlatformPaint() { |
331 endPlatformPaint(); | 331 skia::EndPlatformPaint(this); |
332 } | 332 } |
333 | 333 |
334 void CanvasSkia::Transform(const ui::Transform& transform) { | 334 void CanvasSkia::Transform(const ui::Transform& transform) { |
335 concat(transform.matrix()); | 335 concat(transform.matrix()); |
336 } | 336 } |
337 | 337 |
338 CanvasSkia* CanvasSkia::AsCanvasSkia() { | 338 CanvasSkia* CanvasSkia::AsCanvasSkia() { |
339 return this; | 339 return this; |
340 } | 340 } |
341 | 341 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { | 388 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
389 #if defined(OS_WIN) | 389 #if defined(OS_WIN) |
390 return new CanvasPaintWin(view); | 390 return new CanvasPaintWin(view); |
391 #else | 391 #else |
392 return NULL; | 392 return NULL; |
393 #endif | 393 #endif |
394 } | 394 } |
395 | 395 |
396 } // namespace gfx | 396 } // namespace gfx |
OLD | NEW |