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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 302253002: hide SkDevice::config() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 6 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/gpu/GrPictureUtils.cpp ('k') | src/utils/SkDeferredCanvas.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 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 SK_COMPILE_ASSERT(SkShader::kSweep_BitmapType == 3, shader_type_mismatch); 373 SK_COMPILE_ASSERT(SkShader::kSweep_BitmapType == 3, shader_type_mismatch);
374 SK_COMPILE_ASSERT(SkShader::kTwoPointRadial_BitmapType == 4, 374 SK_COMPILE_ASSERT(SkShader::kTwoPointRadial_BitmapType == 4,
375 shader_type_mismatch); 375 shader_type_mismatch);
376 SK_COMPILE_ASSERT(SkShader::kTwoPointConical_BitmapType == 5, 376 SK_COMPILE_ASSERT(SkShader::kTwoPointConical_BitmapType == 5,
377 shader_type_mismatch); 377 shader_type_mismatch);
378 SK_COMPILE_ASSERT(SkShader::kLinear_BitmapType == 6, shader_type_mismatch); 378 SK_COMPILE_ASSERT(SkShader::kLinear_BitmapType == 6, shader_type_mismatch);
379 SK_COMPILE_ASSERT(SkShader::kLast_BitmapType == 6, shader_type_mismatch); 379 SK_COMPILE_ASSERT(SkShader::kLast_BitmapType == 6, shader_type_mismatch);
380 380
381 /////////////////////////////////////////////////////////////////////////////// 381 ///////////////////////////////////////////////////////////////////////////////
382 382
383 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
383 SkBitmap::Config SkGpuDevice::config() const { 384 SkBitmap::Config SkGpuDevice::config() const {
384 if (NULL == fRenderTarget) { 385 if (NULL == fRenderTarget) {
385 return SkBitmap::kNo_Config; 386 return SkBitmap::kNo_Config;
386 } 387 }
387 388
388 bool isOpaque; 389 bool isOpaque;
389 return grConfig2skConfig(fRenderTarget->config(), &isOpaque); 390 return grConfig2skConfig(fRenderTarget->config(), &isOpaque);
390 } 391 }
392 #endif
391 393
392 void SkGpuDevice::clear(SkColor color) { 394 void SkGpuDevice::clear(SkColor color) {
393 SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); 395 SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
394 fContext->clear(&rect, SkColor2GrColor(color), true, fRenderTarget); 396 fContext->clear(&rect, SkColor2GrColor(color), true, fRenderTarget);
395 fNeedClear = false; 397 fNeedClear = false;
396 } 398 }
397 399
398 void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { 400 void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) {
399 CHECK_SHOULD_DRAW(draw, false); 401 CHECK_SHOULD_DRAW(draw, false);
400 402
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i); 2019 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i);
2018 2020
2019 if (NULL != layer->getTexture()) { 2021 if (NULL != layer->getTexture()) {
2020 fContext->unlockScratchTexture(layer->getTexture()); 2022 fContext->unlockScratchTexture(layer->getTexture());
2021 layer->setTexture(NULL); 2023 layer->setTexture(NULL);
2022 } 2024 }
2023 } 2025 }
2024 2026
2025 return true; 2027 return true;
2026 } 2028 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698