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

Side by Side Diff: src/views/SkWindow.cpp

Issue 1400933002: Fix SkWindow.cpp includes for non-gpu mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: change base branch Created 5 years, 2 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 | « no previous file | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 "SkWindow.h" 8 #include "SkWindow.h"
9 #include "GrContext.h"
10 #include "SkCanvas.h" 9 #include "SkCanvas.h"
11 #include "SkOSMenu.h" 10 #include "SkOSMenu.h"
12 #include "SkSurface.h" 11 #include "SkSurface.h"
13 #include "SkSystemEventTypes.h" 12 #include "SkSystemEventTypes.h"
14 #include "SkTime.h" 13 #include "SkTime.h"
15 14
16 #define SK_EventDelayInval "\xd" "n" "\xa" "l" 15 #define SK_EventDelayInval "\xd" "n" "\xa" "l"
17 16
18 SkWindow::SkWindow() 17 SkWindow::SkWindow()
19 : fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType) 18 : fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType)
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 break; 309 break;
311 default: 310 default:
312 // Do nothing 311 // Do nothing
313 break; 312 break;
314 } 313 }
315 return handled; 314 return handled;
316 } 315 }
317 316
318 #if SK_SUPPORT_GPU 317 #if SK_SUPPORT_GPU
319 318
319 #include "GrContext.h"
320 #include "gl/GrGLInterface.h" 320 #include "gl/GrGLInterface.h"
321 #include "gl/GrGLUtil.h" 321 #include "gl/GrGLUtil.h"
322 #include "SkGr.h" 322 #include "SkGr.h"
323 323
324 GrRenderTarget* SkWindow::renderTarget(const AttachmentInfo& attachmentInfo, 324 GrRenderTarget* SkWindow::renderTarget(const AttachmentInfo& attachmentInfo,
325 const GrGLInterface* interface, GrContext* grContext) { 325 const GrGLInterface* interface, GrContext* grContext) {
326 GrBackendRenderTargetDesc desc; 326 GrBackendRenderTargetDesc desc;
327 desc.fWidth = SkScalarRoundToInt(this->width()); 327 desc.fWidth = SkScalarRoundToInt(this->width());
328 desc.fHeight = SkScalarRoundToInt(this->height()); 328 desc.fHeight = SkScalarRoundToInt(this->height());
329 desc.fConfig = kSkia8888_GrPixelConfig; 329 desc.fConfig = kSkia8888_GrPixelConfig;
330 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 330 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
331 desc.fSampleCnt = attachmentInfo.fSampleCount; 331 desc.fSampleCnt = attachmentInfo.fSampleCount;
332 desc.fStencilBits = attachmentInfo.fStencilBits; 332 desc.fStencilBits = attachmentInfo.fStencilBits;
333 GrGLint buffer; 333 GrGLint buffer;
334 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer); 334 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
335 desc.fRenderTargetHandle = buffer; 335 desc.fRenderTargetHandle = buffer;
336 return grContext->textureProvider()->wrapBackendRenderTarget(desc); 336 return grContext->textureProvider()->wrapBackendRenderTarget(desc);
337 } 337 }
338 338
339 #endif 339 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698