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

Side by Side Diff: src/image/SkSurface_Base.h

Issue 1709163003: Add wrapBackendTextureAsRenderTarget API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix test Created 4 years, 9 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') | src/image/SkSurface_Gpu.h » ('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 #ifndef SkSurface_Base_DEFINED 8 #ifndef SkSurface_Base_DEFINED
9 #define SkSurface_Base_DEFINED 9 #define SkSurface_Base_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 * being shared with the cachedImage. 67 * being shared with the cachedImage.
68 */ 68 */
69 virtual void onCopyOnWrite(ContentChangeMode) = 0; 69 virtual void onCopyOnWrite(ContentChangeMode) = 0;
70 70
71 /** 71 /**
72 * Signal the surface to remind its backing store that it's mutable again. 72 * Signal the surface to remind its backing store that it's mutable again.
73 * Called only when we _didn't_ copy-on-write; we assume the copies start m utable. 73 * Called only when we _didn't_ copy-on-write; we assume the copies start m utable.
74 */ 74 */
75 virtual void onRestoreBackingMutability() {} 75 virtual void onRestoreBackingMutability() {}
76 76
77 /**
78 * Issue any pending surface IO to the current backend 3D API and resolve an y surface MSAA.
79 */
80 virtual void onPrepareForExternalIO() {}
81
77 inline SkCanvas* getCachedCanvas(); 82 inline SkCanvas* getCachedCanvas();
78 inline SkImage* getCachedImage(Budgeted); 83 inline SkImage* getCachedImage(Budgeted);
79 84
80 bool hasCachedImage() const { return fCachedImage != nullptr; } 85 bool hasCachedImage() const { return fCachedImage != nullptr; }
81 86
82 // called by SkSurface to compute a new genID 87 // called by SkSurface to compute a new genID
83 uint32_t newGenerationID(); 88 uint32_t newGenerationID();
84 89
85 private: 90 private:
86 SkCanvas* fCachedCanvas; 91 SkCanvas* fCachedCanvas;
(...skipping 23 matching lines...) Expand all
110 115
111 SkImage* SkSurface_Base::getCachedImage(Budgeted budgeted) { 116 SkImage* SkSurface_Base::getCachedImage(Budgeted budgeted) {
112 if (nullptr == fCachedImage) { 117 if (nullptr == fCachedImage) {
113 fCachedImage = this->onNewImageSnapshot(budgeted); 118 fCachedImage = this->onNewImageSnapshot(budgeted);
114 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this); 119 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
115 } 120 }
116 return fCachedImage; 121 return fCachedImage;
117 } 122 }
118 123
119 #endif 124 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698