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

Side by Side Diff: cc/playback/draw_image.h

Issue 2101403006: Revert of Add display-resolution caching to GPU IDC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drt
Patch Set: Fix test expectations to prevent revert from impacting LayoutTests Created 4 years, 5 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 | « no previous file | cc/tiles/gpu_image_decode_controller.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CC_PLAYBACK_DRAW_IMAGE_H_ 5 #ifndef CC_PLAYBACK_DRAW_IMAGE_H_
6 #define CC_PLAYBACK_DRAW_IMAGE_H_ 6 #define CC_PLAYBACK_DRAW_IMAGE_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "third_party/skia/include/core/SkFilterQuality.h" 9 #include "third_party/skia/include/core/SkFilterQuality.h"
10 #include "third_party/skia/include/core/SkImage.h" 10 #include "third_party/skia/include/core/SkImage.h"
(...skipping 16 matching lines...) Expand all
27 ~DrawImage(); 27 ~DrawImage();
28 28
29 const sk_sp<const SkImage>& image() const { return image_; } 29 const sk_sp<const SkImage>& image() const { return image_; }
30 const SkSize& scale() const { return scale_; } 30 const SkSize& scale() const { return scale_; }
31 const SkIRect src_rect() const { return src_rect_; } 31 const SkIRect src_rect() const { return src_rect_; }
32 SkFilterQuality filter_quality() const { return filter_quality_; } 32 SkFilterQuality filter_quality() const { return filter_quality_; }
33 bool matrix_is_decomposable() const { return matrix_is_decomposable_; } 33 bool matrix_is_decomposable() const { return matrix_is_decomposable_; }
34 const SkMatrix& matrix() const { return matrix_; } 34 const SkMatrix& matrix() const { return matrix_; }
35 35
36 DrawImage ApplyScale(float scale) const { 36 DrawImage ApplyScale(float scale) const {
37 return ApplyScale(SkSize::Make(scale, scale));
38 }
39
40 DrawImage ApplyScale(const SkSize& scale) const {
41 SkMatrix scaled_matrix = matrix_; 37 SkMatrix scaled_matrix = matrix_;
42 scaled_matrix.postScale(scale.width(), scale.height()); 38 scaled_matrix.postScale(scale, scale);
43 return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix); 39 return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix);
44 } 40 }
45 41
46 private: 42 private:
47 sk_sp<const SkImage> image_; 43 sk_sp<const SkImage> image_;
48 SkIRect src_rect_; 44 SkIRect src_rect_;
49 SkFilterQuality filter_quality_; 45 SkFilterQuality filter_quality_;
50 SkMatrix matrix_; 46 SkMatrix matrix_;
51 SkSize scale_; 47 SkSize scale_;
52 bool matrix_is_decomposable_; 48 bool matrix_is_decomposable_;
53 }; 49 };
54 50
55 } // namespace cc 51 } // namespace cc
56 52
57 #endif // CC_PLAYBACK_DRAW_IMAGE_H_ 53 #endif // CC_PLAYBACK_DRAW_IMAGE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/gpu_image_decode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698