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

Unified Diff: samplecode/SampleApp.cpp

Issue 916733002: Support multiple null GL contexts on a thread. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add back old GrGLCreateNullInterface until Chrome stops using it Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleApp.h ('k') | src/gpu/gl/SkNullGLContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index cd5793f6a3007bd62fc5a6228302f5abb8d48ff8..b8e91a6840be9c7ed0472614fb7592f4c2d3cbaa 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -188,8 +188,6 @@ public:
case kPicture_DeviceType:
// fallthrough
case kGPU_DeviceType:
- // fallthrough
- case kNullGPU_DeviceType:
// all these guys use the native backend
fBackend = kNativeGL_BackEndType;
break;
@@ -227,9 +225,6 @@ public:
glInterface.reset(GrGLCreateANGLEInterface());
break;
#endif // SK_ANGLE
- case kNullGPU_DeviceType:
- glInterface.reset(GrGLCreateNullInterface());
- break;
default:
SkASSERT(false);
break;
@@ -680,7 +675,6 @@ static inline SampleWindow::DeviceType cycle_devicetype(SampleWindow::DeviceType
#if SK_ANGLE
SampleWindow::kANGLE_DeviceType,
#endif // SK_ANGLE
- SampleWindow::kRaster_DeviceType, // skip the null gpu device in normal cycling
#endif // SK_SUPPORT_GPU
SampleWindow::kRaster_DeviceType
};
@@ -1258,12 +1252,7 @@ SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) {
} else if (kPicture_DeviceType == fDeviceType) {
canvas = fRecorder.beginRecording(9999, 9999, NULL, 0);
} else {
-#if SK_SUPPORT_GPU
- if (kNullGPU_DeviceType != fDeviceType)
-#endif
- {
- canvas = this->INHERITED::beforeChildren(canvas);
- }
+ canvas = this->INHERITED::beforeChildren(canvas);
}
if (fUseClip) {
@@ -1724,11 +1713,6 @@ bool SampleWindow::onHandleChar(SkUnichar uni) {
this->updateTitle();
return true;
#if SK_SUPPORT_GPU
- case '\\':
- this->setDeviceType(kNullGPU_DeviceType);
- this->inval(NULL);
- this->updateTitle();
- return true;
case 'p':
{
GrContext* grContext = this->getGrContext();
@@ -1961,7 +1945,6 @@ static const char* gDeviceTypePrefix[] = {
#if SK_ANGLE
"angle: ",
#endif // SK_ANGLE
- "null-gl: "
#endif // SK_SUPPORT_GPU
};
SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gDeviceTypePrefix) == SampleWindow::kDeviceTypeCnt,
« no previous file with comments | « samplecode/SampleApp.h ('k') | src/gpu/gl/SkNullGLContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698