| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GFX_CANVAS_H_ | 5 #ifndef UI_GFX_CANVAS_H_ |
| 6 #define UI_GFX_CANVAS_H_ | 6 #define UI_GFX_CANVAS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 int x, | 417 int x, |
| 418 int y, | 418 int y, |
| 419 int w, | 419 int w, |
| 420 int h); | 420 int h); |
| 421 void TileImageInt(const ImageSkia& image, | 421 void TileImageInt(const ImageSkia& image, |
| 422 int src_x, | 422 int src_x, |
| 423 int src_y, | 423 int src_y, |
| 424 int dest_x, | 424 int dest_x, |
| 425 int dest_y, | 425 int dest_y, |
| 426 int w, | 426 int w, |
| 427 int h); | 427 int h, |
| 428 cc::PaintFlags* flags = nullptr); |
| 428 void TileImageInt(const ImageSkia& image, | 429 void TileImageInt(const ImageSkia& image, |
| 429 int src_x, | 430 int src_x, |
| 430 int src_y, | 431 int src_y, |
| 431 float tile_scale_x, | 432 float tile_scale_x, |
| 432 float tile_scale_y, | 433 float tile_scale_y, |
| 433 int dest_x, | 434 int dest_x, |
| 434 int dest_y, | 435 int dest_y, |
| 435 int w, | 436 int w, |
| 436 int h); | 437 int h, |
| 438 cc::PaintFlags* flags = nullptr); |
| 437 | 439 |
| 438 // Helper for TileImageInt(). Initializes |flags| for tiling |image| with the | 440 // Helper for TileImageInt(). Initializes |flags| for tiling |image| with the |
| 439 // given parameters. Returns false if the provided image does not have a | 441 // given parameters. Returns false if the provided image does not have a |
| 440 // representation for the current scale. | 442 // representation for the current scale. |
| 441 bool InitPaintFlagsForTiling(const ImageSkia& image, | 443 bool InitPaintFlagsForTiling(const ImageSkia& image, |
| 442 int src_x, | 444 int src_x, |
| 443 int src_y, | 445 int src_y, |
| 444 float tile_scale_x, | 446 float tile_scale_x, |
| 445 float tile_scale_y, | 447 float tile_scale_y, |
| 446 int dest_x, | 448 int dest_x, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 base::Optional<SkBitmap> bitmap_; | 499 base::Optional<SkBitmap> bitmap_; |
| 498 base::Optional<cc::SkiaPaintCanvas> owned_canvas_; | 500 base::Optional<cc::SkiaPaintCanvas> owned_canvas_; |
| 499 cc::PaintCanvas* canvas_; | 501 cc::PaintCanvas* canvas_; |
| 500 | 502 |
| 501 DISALLOW_COPY_AND_ASSIGN(Canvas); | 503 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 502 }; | 504 }; |
| 503 | 505 |
| 504 } // namespace gfx | 506 } // namespace gfx |
| 505 | 507 |
| 506 #endif // UI_GFX_CANVAS_H_ | 508 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |