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

Side by Side Diff: src/image/SkSurface_Gpu.cpp

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add missing ')'. Created 4 years, 10 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
« no previous file with comments | « src/image/SkSurface.cpp ('k') | tests/TextureStorageAllocator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkSurface_Gpu.h" 8 #include "SkSurface_Gpu.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf aceProps* props) { 113 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf aceProps* props) {
114 SkAutoTUnref<SkGpuDevice> device( 114 SkAutoTUnref<SkGpuDevice> device(
115 SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents)); 115 SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents));
116 if (!device) { 116 if (!device) {
117 return nullptr; 117 return nullptr;
118 } 118 }
119 return new SkSurface_Gpu(device); 119 return new SkSurface_Gpu(device);
120 } 120 }
121 121
122 SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, Budgeted budgeted, const S kImageInfo& info, 122 SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, Budgeted budgeted, const S kImageInfo& info,
123 int sampleCount, const SkSurfaceProps* pro ps) { 123 int sampleCount, const SkSurfaceProps* pro ps,
124 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(ctx, budgeted, info, sa mpleCount, props, 124 GrTextureStorageAllocator customAllocator) {
125 SkGpuDevice::kClear_Ini tContents)); 125 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(
126 ctx, budgeted, info, sampleCount, props, SkGpuDevice::kClear_InitCon tents,
127 customAllocator));
126 if (!device) { 128 if (!device) {
127 return nullptr; 129 return nullptr;
128 } 130 }
129 return new SkSurface_Gpu(device); 131 return new SkSurface_Gpu(device);
130 } 132 }
131 133
132 SkSurface* SkSurface::NewFromBackendTexture(GrContext* context, const GrBackendT extureDesc& desc, 134 SkSurface* SkSurface::NewFromBackendTexture(GrContext* context, const GrBackendT extureDesc& desc,
133 const SkSurfaceProps* props) { 135 const SkSurfaceProps* props) {
134 if (nullptr == context) { 136 if (nullptr == context) {
135 return nullptr; 137 return nullptr;
(...skipping 26 matching lines...) Expand all
162 } 164 }
163 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(rt, props, 165 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(rt, props,
164 SkGpuDevice::kUninit_In itContents)); 166 SkGpuDevice::kUninit_In itContents));
165 if (!device) { 167 if (!device) {
166 return nullptr; 168 return nullptr;
167 } 169 }
168 return new SkSurface_Gpu(device); 170 return new SkSurface_Gpu(device);
169 } 171 }
170 172
171 #endif 173 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | tests/TextureStorageAllocator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698