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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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/SkImage_Gpu.cpp ('k') | tests/FloatingPointTextureTest.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SkASSERT(image); 99 SkASSERT(image);
100 if (rt->asTexture() == as_IB(image)->getTexture()) { 100 if (rt->asTexture() == as_IB(image)->getTexture()) {
101 this->fDevice->replaceRenderTarget(SkSurface::kRetain_ContentChangeMode == mode); 101 this->fDevice->replaceRenderTarget(SkSurface::kRetain_ContentChangeMode == mode);
102 SkTextureImageApplyBudgetedDecision(image); 102 SkTextureImageApplyBudgetedDecision(image);
103 } else if (kDiscard_ContentChangeMode == mode) { 103 } else if (kDiscard_ContentChangeMode == mode) {
104 this->SkSurface_Gpu::onDiscard(); 104 this->SkSurface_Gpu::onDiscard();
105 } 105 }
106 } 106 }
107 107
108 void SkSurface_Gpu::onDiscard() { 108 void SkSurface_Gpu::onDiscard() {
109 fDevice->accessRenderTarget()->discard(); 109 fDevice->discard37();
110 } 110 }
111 111
112 /////////////////////////////////////////////////////////////////////////////// 112 ///////////////////////////////////////////////////////////////////////////////
113 113
114 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf aceProps* props) { 114 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, const SkSurf aceProps* props) {
115 SkAutoTUnref<SkGpuDevice> device( 115 SkAutoTUnref<SkGpuDevice> device(
116 SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents)); 116 SkGpuDevice::Create(target, props, SkGpuDevice::kUninit_InitContents));
117 if (!device) { 117 if (!device) {
118 return nullptr; 118 return nullptr;
119 } 119 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(rt, props, 164 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(rt, props,
165 SkGpuDevice::kUninit_In itContents)); 165 SkGpuDevice::kUninit_In itContents));
166 if (!device) { 166 if (!device) {
167 return nullptr; 167 return nullptr;
168 } 168 }
169 return new SkSurface_Gpu(device); 169 return new SkSurface_Gpu(device);
170 } 170 }
171 171
172 #endif 172 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/FloatingPointTextureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698