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

Side by Side Diff: cc/resources/picture.h

Issue 494503002: Expose IsSolidColor and write units tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a mac specific build break Created 6 years, 3 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/resources/picture.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_RESOURCES_PICTURE_H_ 5 #ifndef CC_RESOURCES_PICTURE_H_
6 #define CC_RESOURCES_PICTURE_H_ 6 #define CC_RESOURCES_PICTURE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); 62 static scoped_refptr<Picture> CreateFromValue(const base::Value* value);
63 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); 63 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value);
64 64
65 gfx::Rect LayerRect() const { return layer_rect_; } 65 gfx::Rect LayerRect() const { return layer_rect_; }
66 gfx::Rect OpaqueRect() const { return opaque_rect_; } 66 gfx::Rect OpaqueRect() const { return opaque_rect_; }
67 67
68 // Has Record() been called yet? 68 // Has Record() been called yet?
69 bool HasRecording() const { return picture_.get() != NULL; } 69 bool HasRecording() const { return picture_.get() != NULL; }
70 70
71 bool IsSuitableForGpuRasterization() const; 71 bool IsSuitableForGpuRasterization() const;
72 int ApproximateOpCount() const;
72 73
73 bool HasText() const; 74 bool HasText() const;
74 75
75 // Apply this scale and raster the negated region into the canvas. 76 // Apply this scale and raster the negated region into the canvas.
76 // |negated_content_region| specifies the region to be clipped out of the 77 // |negated_content_region| specifies the region to be clipped out of the
77 // raster operation, i.e., the parts of the canvas which will not get drawn 78 // raster operation, i.e., the parts of the canvas which will not get drawn
78 // to. 79 // to.
79 int Raster(SkCanvas* canvas, 80 int Raster(SkCanvas* canvas,
80 SkDrawPictureCallback* callback, 81 SkDrawPictureCallback* callback,
81 const Region& negated_content_region, 82 const Region& negated_content_region,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 AsTraceableRecordData() const; 168 AsTraceableRecordData() const;
168 169
169 friend class base::RefCountedThreadSafe<Picture>; 170 friend class base::RefCountedThreadSafe<Picture>;
170 friend class PixelRefIterator; 171 friend class PixelRefIterator;
171 DISALLOW_COPY_AND_ASSIGN(Picture); 172 DISALLOW_COPY_AND_ASSIGN(Picture);
172 }; 173 };
173 174
174 } // namespace cc 175 } // namespace cc
175 176
176 #endif // CC_RESOURCES_PICTURE_H_ 177 #endif // CC_RESOURCES_PICTURE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698