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

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

Issue 222903005: cc: Let skia veto gpu rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comment about SetNeedsCommit Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 gfx::Rect LayerRect() const { return layer_rect_; } 64 gfx::Rect LayerRect() const { return layer_rect_; }
65 gfx::Rect OpaqueRect() const { return opaque_rect_; } 65 gfx::Rect OpaqueRect() const { return opaque_rect_; }
66 66
67 // Get thread-safe clone for rasterizing with on a specific thread. 67 // Get thread-safe clone for rasterizing with on a specific thread.
68 Picture* GetCloneForDrawingOnThread(unsigned thread_index); 68 Picture* GetCloneForDrawingOnThread(unsigned thread_index);
69 69
70 // Has Record() been called yet? 70 // Has Record() been called yet?
71 bool HasRecording() const { return picture_.get() != NULL; } 71 bool HasRecording() const { return picture_.get() != NULL; }
72 72
73 bool IsSuitableForGpuRasterization() const;
74
73 // Apply this scale and raster the negated region into the canvas. See comment 75 // Apply this scale and raster the negated region into the canvas. See comment
74 // in PicturePileImpl::RasterCommon for explanation on negated content region. 76 // in PicturePileImpl::RasterCommon for explanation on negated content region.
75 int Raster(SkCanvas* canvas, 77 int Raster(SkCanvas* canvas,
76 SkDrawPictureCallback* callback, 78 SkDrawPictureCallback* callback,
77 const Region& negated_content_region, 79 const Region& negated_content_region,
78 float contents_scale); 80 float contents_scale);
79 81
80 // Draw the picture directly into the given canvas, without applying any 82 // Draw the picture directly into the given canvas, without applying any
81 // clip/scale/layer transformations. 83 // clip/scale/layer transformations.
82 void Replay(SkCanvas* canvas); 84 void Replay(SkCanvas* canvas);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 base::ThreadChecker raster_thread_checker_; 172 base::ThreadChecker raster_thread_checker_;
171 173
172 friend class base::RefCountedThreadSafe<Picture>; 174 friend class base::RefCountedThreadSafe<Picture>;
173 friend class PixelRefIterator; 175 friend class PixelRefIterator;
174 DISALLOW_COPY_AND_ASSIGN(Picture); 176 DISALLOW_COPY_AND_ASSIGN(Picture);
175 }; 177 };
176 178
177 } // namespace cc 179 } // namespace cc
178 180
179 #endif // CC_RESOURCES_PICTURE_H_ 181 #endif // CC_RESOURCES_PICTURE_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698