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

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

Issue 422233008: Re-raster during scale animations for GPU-rasterized layers without text (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 gfx::Rect OpaqueRect() const { return opaque_rect_; } 68 gfx::Rect OpaqueRect() const { return opaque_rect_; }
69 69
70 // Get thread-safe clone for rasterizing with on a specific thread. 70 // Get thread-safe clone for rasterizing with on a specific thread.
71 Picture* GetCloneForDrawingOnThread(unsigned thread_index); 71 Picture* GetCloneForDrawingOnThread(unsigned thread_index);
72 72
73 // Has Record() been called yet? 73 // Has Record() been called yet?
74 bool HasRecording() const { return picture_.get() != NULL; } 74 bool HasRecording() const { return picture_.get() != NULL; }
75 75
76 bool IsSuitableForGpuRasterization() const; 76 bool IsSuitableForGpuRasterization() const;
77 77
78 bool HasText() const;
79
78 // Apply this scale and raster the negated region into the canvas. 80 // Apply this scale and raster the negated region into the canvas.
79 // |negated_content_region| specifies the region to be clipped out of the 81 // |negated_content_region| specifies the region to be clipped out of the
80 // raster operation, i.e., the parts of the canvas which will not get drawn 82 // raster operation, i.e., the parts of the canvas which will not get drawn
81 // to. 83 // to.
82 int Raster(SkCanvas* canvas, 84 int Raster(SkCanvas* canvas,
83 SkDrawPictureCallback* callback, 85 SkDrawPictureCallback* callback,
84 const Region& negated_content_region, 86 const Region& negated_content_region,
85 float contents_scale); 87 float contents_scale);
86 88
87 // Draw the picture directly into the given canvas, without applying any 89 // Draw the picture directly into the given canvas, without applying any
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 base::ThreadChecker raster_thread_checker_; 180 base::ThreadChecker raster_thread_checker_;
179 181
180 friend class base::RefCountedThreadSafe<Picture>; 182 friend class base::RefCountedThreadSafe<Picture>;
181 friend class PixelRefIterator; 183 friend class PixelRefIterator;
182 DISALLOW_COPY_AND_ASSIGN(Picture); 184 DISALLOW_COPY_AND_ASSIGN(Picture);
183 }; 185 };
184 186
185 } // namespace cc 187 } // namespace cc
186 188
187 #endif // CC_RESOURCES_PICTURE_H_ 189 #endif // CC_RESOURCES_PICTURE_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698