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

Unified Diff: src/image/SkSurface_Gpu.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Address comments Created 5 years, 6 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
Index: src/image/SkSurface_Gpu.cpp
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index cf0f0788d2f84de3cebc6bb87f3e5d877094a2aa..7f5fe79a729a93d70f830b54398297dd27bcbfdd 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -37,7 +37,7 @@ SkCanvas* SkSurface_Gpu::onNewCanvas() {
SkSurface* SkSurface_Gpu::onNewSurface(const SkImageInfo& info) {
GrRenderTarget* rt = fDevice->accessRenderTarget();
- int sampleCount = rt->numSamples();
+ int sampleCount = rt->numColorSamples();
// TODO: Make caller specify this (change virtual signature of onNewSurface).
static const Budgeted kBudgeted = kNo_Budgeted;
return SkSurface::NewRenderTarget(fDevice->context(), kBudgeted, info, sampleCount,
@@ -46,7 +46,7 @@ SkSurface* SkSurface_Gpu::onNewSurface(const SkImageInfo& info) {
SkImage* SkSurface_Gpu::onNewImageSnapshot(Budgeted budgeted) {
const SkImageInfo info = fDevice->imageInfo();
- const int sampleCount = fDevice->accessRenderTarget()->numSamples();
+ const int sampleCount = fDevice->accessRenderTarget()->numColorSamples();
SkImage* image = NULL;
GrTexture* tex = fDevice->accessRenderTarget()->asTexture();
if (tex) {

Powered by Google App Engine
This is Rietveld 408576698