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

Unified Diff: cc/playback/draw_image.h

Issue 1418573002: cc: Add image decode control in the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/draw_image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/draw_image.h
diff --git a/cc/playback/draw_image.h b/cc/playback/draw_image.h
index 3dbce12e5323570c892415da1549ffc54bb13aba..88ecfdf44ed0da88e1171bc1f65e5bce0157bfd2 100644
--- a/cc/playback/draw_image.h
+++ b/cc/playback/draw_image.h
@@ -5,34 +5,47 @@
#ifndef CC_PLAYBACK_DRAW_IMAGE_H_
#define CC_PLAYBACK_DRAW_IMAGE_H_
+#include "cc/base/cc_export.h"
#include "third_party/skia/include/core/SkFilterQuality.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkMatrix.h"
namespace cc {
-class DrawImage {
+// TODO(vmpstr): This should probably be DISALLOW_COPY_AND_ASSIGN and transport
+// it around using a pointer, since it became kind of large. Profile.
+class CC_EXPORT DrawImage {
public:
- DrawImage() : image_(nullptr), filter_quality_(kNone_SkFilterQuality) {}
+ DrawImage();
DrawImage(const SkImage* image,
+ const SkIRect& src_rect,
const SkSize& scale,
- SkFilterQuality filter_quality)
- : image_(image), scale_(scale), filter_quality_(filter_quality) {}
+ SkFilterQuality filter_quality,
+ bool matrix_has_perspective,
+ bool matrix_is_decomposable);
+ DrawImage(const DrawImage& other);
const SkImage* image() const { return image_; }
const SkSize& scale() const { return scale_; }
+ const SkIRect src_rect() const { return src_rect_; }
SkFilterQuality filter_quality() const { return filter_quality_; }
+ bool matrix_has_perspective() const { return matrix_has_perspective_; }
+ bool matrix_is_decomposable() const { return matrix_is_decomposable_; }
DrawImage ApplyScale(float scale) const {
return DrawImage(
- image_, SkSize::Make(scale_.width() * scale, scale_.height() * scale),
- filter_quality_);
+ image_, src_rect_,
+ SkSize::Make(scale_.width() * scale, scale_.height() * scale),
+ filter_quality_, matrix_has_perspective_, matrix_is_decomposable_);
}
private:
const SkImage* image_;
+ SkIRect src_rect_;
SkSize scale_;
SkFilterQuality filter_quality_;
+ bool matrix_has_perspective_;
+ bool matrix_is_decomposable_;
};
} // namespace cc
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/draw_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698