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

Side by Side Diff: ui/gfx/canvas.h

Issue 2787683002: cleanup: Cleanup the TileImageInt APIs (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | ui/gfx/canvas.cc » ('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) 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 float tile_scale = 1.0f,
429 void TileImageInt(const ImageSkia& image,
430 int src_x,
431 int src_y,
432 float tile_scale_x,
433 float tile_scale_y,
434 int dest_x,
435 int dest_y,
436 int w,
437 int h,
438 cc::PaintFlags* flags = nullptr); 429 cc::PaintFlags* flags = nullptr);
439 430
440 // Helper for TileImageInt(). Initializes |flags| for tiling |image| with the 431 // Helper for TileImageInt(). Initializes |flags| for tiling |image| with the
441 // given parameters. Returns false if the provided image does not have a 432 // given parameters. Returns false if the provided image does not have a
442 // representation for the current scale. 433 // representation for the current scale.
443 bool InitPaintFlagsForTiling(const ImageSkia& image, 434 bool InitPaintFlagsForTiling(const ImageSkia& image,
444 int src_x, 435 int src_x,
445 int src_y, 436 int src_y,
446 float tile_scale_x, 437 float tile_scale_x,
447 float tile_scale_y, 438 float tile_scale_y,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 base::Optional<SkBitmap> bitmap_; 490 base::Optional<SkBitmap> bitmap_;
500 base::Optional<cc::SkiaPaintCanvas> owned_canvas_; 491 base::Optional<cc::SkiaPaintCanvas> owned_canvas_;
501 cc::PaintCanvas* canvas_; 492 cc::PaintCanvas* canvas_;
502 493
503 DISALLOW_COPY_AND_ASSIGN(Canvas); 494 DISALLOW_COPY_AND_ASSIGN(Canvas);
504 }; 495 };
505 496
506 } // namespace gfx 497 } // namespace gfx
507 498
508 #endif // UI_GFX_CANVAS_H_ 499 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698