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

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

Issue 1832573004: Gpu Image Decode Controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixes Created 4 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
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 10 matching lines...) Expand all
21 const SkIRect& src_rect, 21 const SkIRect& src_rect,
22 SkFilterQuality filter_quality, 22 SkFilterQuality filter_quality,
23 const SkMatrix& matrix); 23 const SkMatrix& matrix);
24 DrawImage(const DrawImage& other); 24 DrawImage(const DrawImage& other);
25 25
26 const SkImage* image() const { return image_; } 26 const SkImage* image() const { return image_; }
27 const SkSize& scale() const { return scale_; } 27 const SkSize& scale() const { return scale_; }
28 const SkIRect src_rect() const { return src_rect_; } 28 const SkIRect src_rect() const { return src_rect_; }
29 SkFilterQuality filter_quality() const { return filter_quality_; } 29 SkFilterQuality filter_quality() const { return filter_quality_; }
30 bool matrix_is_decomposable() const { return matrix_is_decomposable_; } 30 bool matrix_is_decomposable() const { return matrix_is_decomposable_; }
31 const SkMatrix& matrix() { return matrix_; } 31 const SkMatrix& matrix() const { return matrix_; }
32 32
33 DrawImage ApplyScale(float scale) const { 33 DrawImage ApplyScale(float scale) const {
34 SkMatrix scaled_matrix = matrix_; 34 SkMatrix scaled_matrix = matrix_;
35 scaled_matrix.postScale(scale, scale); 35 scaled_matrix.postScale(scale, scale);
36 return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix); 36 return DrawImage(image_, src_rect_, filter_quality_, scaled_matrix);
37 } 37 }
38 38
39 private: 39 private:
40 const SkImage* image_; 40 const SkImage* image_;
41 SkIRect src_rect_; 41 SkIRect src_rect_;
42 SkFilterQuality filter_quality_; 42 SkFilterQuality filter_quality_;
43 SkMatrix matrix_; 43 SkMatrix matrix_;
44 SkSize scale_; 44 SkSize scale_;
45 bool matrix_is_decomposable_; 45 bool matrix_is_decomposable_;
46 }; 46 };
47 47
48 } // namespace cc 48 } // namespace cc
49 49
50 #endif // CC_PLAYBACK_DRAW_IMAGE_H_ 50 #endif // CC_PLAYBACK_DRAW_IMAGE_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/raster/tile_task_runner.h » ('j') | cc/raster/tile_task_runner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698