Lines Matching defs:surf
108 auto surf = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info, 1, nullptr);
109 REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d",
110 colorType, can, SkToBool(surf));
112 surf = sk_gpu_test::MakeBackendTextureSurface(context,
117 REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d",
118 colorType, can, SkToBool(surf));
126 auto surf = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info, kSampleCnt,
128 REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d",
129 colorType, can, SkToBool(surf));
131 surf = sk_gpu_test::MakeBackendTextureSurface(
133 REPORTER_ASSERT(reporter, can == SkToBool(surf),
134 "colorTypeSupportedAsSurface:%d, surf:%d, ct:%d", can, SkToBool(surf),
137 if (surf) {
138 auto rtp = SkCanvasPriv::TopDeviceTargetProxy(surf->getCanvas());
150 auto surf = sk_gpu_test::MakeBackendRenderTargetSurface(context,
157 if (!surf && can && colorType == kBGRA_8888_SkColorType && sampleCnt > 1 &&
168 REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, sc: %d, can: %d, surf: %d",
169 colorType, sampleCnt, can, SkToBool(surf));
170 if (surf) {
171 auto rtp = SkCanvasPriv::TopDeviceTargetProxy(surf->getCanvas());
201 auto surf = sk_gpu_test::MakeBackendTextureSurface(
203 if (!surf) {
208 ((SkSurface_Gpu*)(surf.get()))->getDevice()->targetProxy()->numSamples();
567 static SkBudgeted is_budgeted(const sk_sp<SkSurface>& surf) {
568 SkSurface_Gpu* gsurf = (SkSurface_Gpu*)surf.get();
717 auto surf = sk_gpu_test::MakeBackendTextureSurface(dContext,
722 if (!surf) {
725 surf->getCanvas()->clear(color);
726 return surf;
744 auto surf = sk_gpu_test::MakeBackendRenderTargetSurface(dContext,
749 if (!surf) {
752 surf->getCanvas()->clear(color);
753 return surf;
1039 auto surf = SkSurface::MakeFromBackendTexture(
1042 if (!surf) {
1045 surf->getCanvas()->clear(SK_ColorBLUE);
1047 surf->getCanvas()->translate(5, 5);
1048 surf->getCanvas()->saveLayer(nullptr, nullptr);
1049 surf->getCanvas()->clipRect(SkRect::MakeXYWH(0, 0, 1, 1));
1051 bool replaced = surf->replaceBackendTexture(mbet2->texture(), kBottomLeft_GrSurfaceOrigin);
1055 surf->getCanvas()->drawRect(SkRect::MakeWH(5, 5), paint);
1056 surf->getCanvas()->restore();
1061 bool bad = !surf->readPixels(pm, 0, 0);
1075 surf = SkSurface::MakeFromBackendTexture(
1078 if (!surf) {
1082 bad = !surf->readPixels(pm, 0, 0);
1098 !surf->replaceBackendTexture(mbet1->texture(), kTopLeft_GrSurfaceOrigin));
1100 REPORTER_ASSERT(reporter, !surf->replaceBackendTexture({}, kTopLeft_GrSurfaceOrigin));
1103 !surf->replaceBackendTexture(mbet3->texture(), kTopLeft_GrSurfaceOrigin));
1105 surf = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, ii, sampleCnt, nullptr);
1106 REPORTER_ASSERT(reporter, surf);
1107 if (surf) {
1108 REPORTER_ASSERT(reporter, !surf->replaceBackendTexture(mbet1->texture(),
1144 auto surf = SkSurface::MakeNull(w, h);
1145 auto canvas = surf->getCanvas();
1148 REPORTER_ASSERT(r, surf->makeImageSnapshot() == nullptr);
1156 auto surf = SkSurface::MakeRaster(info, rowBytes, nullptr);
1157 if (surf) {
1158 auto img = surf->makeImageSnapshot();