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

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

Issue 2682123003: Remove uses of skia::ReadPixels(PaintCanvas) (Closed)
Patch Set: more readpixels Created 3 years, 10 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 | « content/renderer/pepper/plugin_instance_throttler_impl_unittest.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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // Apply transformation on the canvas. 464 // Apply transformation on the canvas.
465 void Transform(const Transform& transform); 465 void Transform(const Transform& transform);
466 466
467 // Draws the given string with a fade gradient at the end. 467 // Draws the given string with a fade gradient at the end.
468 void DrawFadedString(const base::string16& text, 468 void DrawFadedString(const base::string16& text,
469 const FontList& font_list, 469 const FontList& font_list,
470 SkColor color, 470 SkColor color,
471 const Rect& display_rect, 471 const Rect& display_rect,
472 int flags); 472 int flags);
473 473
474 SkBitmap ToBitmap();
475
474 // TODO(enne): rename sk_canvas members and interface. 476 // TODO(enne): rename sk_canvas members and interface.
475 cc::PaintCanvas* sk_canvas() { return canvas_; } 477 cc::PaintCanvas* sk_canvas() { return canvas_; }
476 float image_scale() const { return image_scale_; } 478 float image_scale() const { return image_scale_; }
477 479
478 private: 480 private:
479 // Tests whether the provided rectangle intersects the current clip rect. 481 // Tests whether the provided rectangle intersects the current clip rect.
480 bool IntersectsClipRect(const SkRect& rect); 482 bool IntersectsClipRect(const SkRect& rect);
481 483
482 // Helper for the DrawImageInt functions declared above. The 484 // Helper for the DrawImageInt functions declared above. The
483 // |remove_image_scale| parameter indicates if the scale of the |image_rep| 485 // |remove_image_scale| parameter indicates if the scale of the |image_rep|
(...skipping 22 matching lines...) Expand all
506 // but surface_ will be null. 508 // but surface_ will be null.
507 sk_sp<cc::PaintSurface> surface_; 509 sk_sp<cc::PaintSurface> surface_;
508 cc::PaintCanvas* canvas_; 510 cc::PaintCanvas* canvas_;
509 511
510 DISALLOW_COPY_AND_ASSIGN(Canvas); 512 DISALLOW_COPY_AND_ASSIGN(Canvas);
511 }; 513 };
512 514
513 } // namespace gfx 515 } // namespace gfx
514 516
515 #endif // UI_GFX_CANVAS_H_ 517 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698