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

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

Issue 204903002: Fix accessBitmap() with deferred clear, GPU path. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 flags = GrContext::kUnpremul_PixelOpsFlag; 426 flags = GrContext::kUnpremul_PixelOpsFlag;
427 } 427 }
428 fRenderTarget->writePixels(x, y, info.width(), info.height(), config, pixels , rowBytes, flags); 428 fRenderTarget->writePixels(x, y, info.width(), info.height(), config, pixels , rowBytes, flags);
429 429
430 // need to bump our genID for compatibility with clients that "know" we have a bitmap 430 // need to bump our genID for compatibility with clients that "know" we have a bitmap
431 this->onAccessBitmap().notifyPixelsChanged(); 431 this->onAccessBitmap().notifyPixelsChanged();
432 432
433 return true; 433 return true;
434 } 434 }
435 435
436 const SkBitmap& SkGpuDevice::onAccessBitmap() {
437 DO_DEFERRED_CLEAR();
438 return INHERITED::onAccessBitmap();
439 }
440
436 void SkGpuDevice::onAttachToCanvas(SkCanvas* canvas) { 441 void SkGpuDevice::onAttachToCanvas(SkCanvas* canvas) {
437 INHERITED::onAttachToCanvas(canvas); 442 INHERITED::onAttachToCanvas(canvas);
438 443
439 // Canvas promises that this ptr is valid until onDetachFromCanvas is called 444 // Canvas promises that this ptr is valid until onDetachFromCanvas is called
440 fClipData.fClipStack = canvas->getClipStack(); 445 fClipData.fClipStack = canvas->getClipStack();
441 } 446 }
442 447
443 void SkGpuDevice::onDetachFromCanvas() { 448 void SkGpuDevice::onDetachFromCanvas() {
444 INHERITED::onDetachFromCanvas(); 449 INHERITED::onDetachFromCanvas();
445 fClipData.fClipStack = NULL; 450 fClipData.fClipStack = NULL;
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 if (NULL == data) { 2041 if (NULL == data) {
2037 return false; 2042 return false;
2038 } 2043 }
2039 2044
2040 #if 0 2045 #if 0
2041 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data); 2046 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data);
2042 #endif 2047 #endif
2043 2048
2044 return false; 2049 return false;
2045 } 2050 }
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698