| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 "GrDrawTarget.h" | 8 #include "GrDrawTarget.h" |
| 9 | 9 |
| 10 #include "GrAppliedClip.h" | 10 #include "GrAppliedClip.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 #ifdef SK_DEBUG | 172 #ifdef SK_DEBUG |
| 173 GrCapsDebugf(this->caps(), "Missed an early reject. " | 173 GrCapsDebugf(this->caps(), "Missed an early reject. " |
| 174 "Bailing on draw from setupDstReadIfNecessary
.\n"); | 174 "Bailing on draw from setupDstReadIfNecessary
.\n"); |
| 175 #endif | 175 #endif |
| 176 return false; | 176 return false; |
| 177 } | 177 } |
| 178 | 178 |
| 179 // MSAA consideration: When there is support for reading MSAA samples in the
shader we could | 179 // MSAA consideration: When there is support for reading MSAA samples in the
shader we could |
| 180 // have per-sample dst values by making the copy multisampled. | 180 // have per-sample dst values by making the copy multisampled. |
| 181 GrSurfaceDesc desc; | 181 GrSurfaceDesc desc; |
| 182 if (!fGpu->initCopySurfaceDstDesc(rt, &desc)) { | 182 if (!fGpu->initDescForDstCopy(rt, &desc)) { |
| 183 desc.fOrigin = kDefault_GrSurfaceOrigin; | 183 desc.fOrigin = kDefault_GrSurfaceOrigin; |
| 184 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 184 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 185 desc.fConfig = rt->config(); | 185 desc.fConfig = rt->config(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 desc.fWidth = copyRect.width(); | 188 desc.fWidth = copyRect.width(); |
| 189 desc.fHeight = copyRect.height(); | 189 desc.fHeight = copyRect.height(); |
| 190 | 190 |
| 191 static const uint32_t kFlags = 0; | 191 static const uint32_t kFlags = 0; |
| 192 SkAutoTUnref<GrTexture> copy(fResourceProvider->createApproxTexture(desc, kF
lags)); | 192 SkAutoTUnref<GrTexture> copy(fResourceProvider->createApproxTexture(desc, kF
lags)); |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 } | 616 } |
| 617 } | 617 } |
| 618 | 618 |
| 619 /////////////////////////////////////////////////////////////////////////////// | 619 /////////////////////////////////////////////////////////////////////////////// |
| 620 | 620 |
| 621 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 621 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
| 622 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 622 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
| 623 this->recordBatch(batch, batch->bounds()); | 623 this->recordBatch(batch, batch->bounds()); |
| 624 batch->unref(); | 624 batch->unref(); |
| 625 } | 625 } |
| OLD | NEW |