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

Unified Diff: cc/resources/picture.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_pile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 8080d22cb46273be2394106dc1255cda648dac82..93b59aea7435532456ab03b9248113b8e5c8d46c 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -197,6 +197,19 @@ Picture* Picture::GetCloneForDrawingOnThread(unsigned thread_index) {
return thread_index == clones_.size() ? this : clones_[thread_index].get();
}
+bool Picture::IsSuitableForGpuRasterization() const {
+ DCHECK(picture_);
+
+ // TODO(alokp): SkPicture::suitableForGpuRasterization needs a GrContext.
+ // Ideally this GrContext should be the same as that for rasterizing this
+ // picture. But we are on the main thread while the rasterization context
+ // may be on the compositor or raster thread.
+ // SkPicture::suitableForGpuRasterization is not implemented yet.
+ // Pass a NULL context for now and discuss with skia folks if the context
+ // is really needed.
+ return picture_->suitableForGpuRasterization(NULL);
+}
+
void Picture::CloneForDrawing(int num_threads) {
TRACE_EVENT1("cc", "Picture::CloneForDrawing", "num_threads", num_threads);
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_pile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698