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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « cc/resources/managed_tile_state.cc ('k') | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 static scoped_refptr<Picture> CreateFromValue(const base::Value* value); 60 static scoped_refptr<Picture> CreateFromValue(const base::Value* value);
61 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value); 61 static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value);
62 62
63 gfx::Rect LayerRect() const { return layer_rect_; } 63 gfx::Rect LayerRect() const { return layer_rect_; }
64 64
65 // Has Record() been called yet? 65 // Has Record() been called yet?
66 bool HasRecording() const { return picture_.get() != NULL; } 66 bool HasRecording() const { return picture_.get() != NULL; }
67 67
68 bool IsSuitableForGpuRasterization() const; 68 bool IsSuitableForGpuRasterization() const;
69 int ApproximateOpCount() const; 69 int ApproximateOpCount() const;
70 size_t ApproximateMemoryUsage() const;
70 71
71 bool HasText() const; 72 bool HasText() const;
72 73
73 // Apply this scale and raster the negated region into the canvas. 74 // Apply this scale and raster the negated region into the canvas.
74 // |negated_content_region| specifies the region to be clipped out of the 75 // |negated_content_region| specifies the region to be clipped out of the
75 // raster operation, i.e., the parts of the canvas which will not get drawn 76 // raster operation, i.e., the parts of the canvas which will not get drawn
76 // to. 77 // to.
77 int Raster(SkCanvas* canvas, 78 int Raster(SkCanvas* canvas,
78 SkDrawPictureCallback* callback, 79 SkDrawPictureCallback* callback,
79 const Region& negated_content_region, 80 const Region& negated_content_region,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 AsTraceableRecordData() const; 161 AsTraceableRecordData() const;
161 162
162 friend class base::RefCountedThreadSafe<Picture>; 163 friend class base::RefCountedThreadSafe<Picture>;
163 friend class PixelRefIterator; 164 friend class PixelRefIterator;
164 DISALLOW_COPY_AND_ASSIGN(Picture); 165 DISALLOW_COPY_AND_ASSIGN(Picture);
165 }; 166 };
166 167
167 } // namespace cc 168 } // namespace cc
168 169
169 #endif // CC_RESOURCES_PICTURE_H_ 170 #endif // CC_RESOURCES_PICTURE_H_
OLDNEW
« no previous file with comments | « cc/resources/managed_tile_state.cc ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698